diff options
Diffstat (limited to 'test/pending/pos/nothing.scala')
-rw-r--r-- | test/pending/pos/nothing.scala | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/pending/pos/nothing.scala b/test/pending/pos/nothing.scala deleted file mode 100644 index f76017fb16..0000000000 --- a/test/pending/pos/nothing.scala +++ /dev/null @@ -1,24 +0,0 @@ -// More shoddy treatment for nothing. -class A { - class Q3A[+T1, T2 <: T1](x: T1) - class Q3B[+T1, T2 <: T1](x: Q3A[T1, T2]) - - val x1 = new Q3B(new Q3A("a")) - val x2 = new Q3B(new Q3A[String, Nothing]("a")) - val x3 = new Q3B(new Q3A[String, Null]("a")) - // test/pending/pos/nothing.scala:5: error: type mismatch; - // found : A.this.Q3A[String,Nothing] - // required: A.this.Q3A[String,T2] - // Note: Nothing <: T2, but class Q3A is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // val x1 = new Q3B(new Q3A("a")) - // ^ - // test/pending/pos/nothing.scala:6: error: type mismatch; - // found : A.this.Q3A[String,Nothing] - // required: A.this.Q3A[String,T2] - // Note: Nothing <: T2, but class Q3A is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // val x2 = new Q3B(new Q3A[String, Nothing]("a")) - // ^ - // two errors found -} |