Skip to content

Commit 89adb4b

Browse files
committed
Test for #6205
1 parent 043d517 commit 89adb4b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/neg/i6205.check

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- [E057] Type Mismatch Error: tests/neg/i6205.scala:4:9 ---------------------------------------------------------------
2+
4 | def foo = // error
3+
| ^
4+
| Type argument Nothing does not conform to lower bound Null in inferred type Contra[Nothing]
5+
6+
longer explanation available when compiling with `-explain`

tests/neg/i6205.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Contra[-T >: Null]
2+
3+
object Test:
4+
def foo = // error
5+
class A
6+
new Contra[A]
7+
8+
val x = foo

0 commit comments

Comments
 (0)