File tree 1 file changed +12
-3
lines changed
presentation-compiler/test/dotty/tools/pc/tests
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class InferExpectedTypeSuite extends BasePCSuite:
26
26
EmptyCancelToken
27
27
)
28
28
presentationCompiler.asInstanceOf [ScalaPresentationCompiler ].inferExpectedType(offsetParams).get().asScala match {
29
- case Some (value) => assertNoDiff(value, expectedType )
29
+ case Some (value) => assertNoDiff(expectedType, value )
30
30
case None => fail(" Empty result." )
31
31
}
32
32
@@ -232,6 +232,15 @@ class InferExpectedTypeSuite extends BasePCSuite:
232
232
|""" .stripMargin
233
233
)
234
234
235
+ @ Ignore (" Generic functions are not handled correctly." )
236
+ @ Test def map =
237
+ check(
238
+ """ |val _ : List[Int] = List().map(_ => @@)
239
+ |""" .stripMargin,
240
+ """ |Int
241
+ |""" .stripMargin
242
+ )
243
+
235
244
@ Ignore (" Generic functions are not handled correctly." )
236
245
@ Test def `for-comprehension` =
237
246
check(
@@ -260,7 +269,7 @@ class InferExpectedTypeSuite extends BasePCSuite:
260
269
@ Test def `bounds-1` =
261
270
check(
262
271
""" |trait Foo
263
- |def foo[T <: Foo](a: Foo ): Boolean = ???
272
+ |def foo[T <: Foo](a: T ): Boolean = ???
264
273
|val _ = foo(@@)
265
274
|""" .stripMargin,
266
275
""" |<: Foo
@@ -271,7 +280,7 @@ class InferExpectedTypeSuite extends BasePCSuite:
271
280
@ Test def `bounds-2` =
272
281
check(
273
282
""" |trait Foo
274
- |def foo[T :> Foo](a: Foo ): Boolean = ???
283
+ |def foo[T >: Foo](a: T ): Boolean = ???
275
284
|val _ = foo(@@)
276
285
|""" .stripMargin,
277
286
""" |:> Foo
You can’t perform that action at this time.
0 commit comments