diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/pending/neg/t8079d.check | 4 | ||||
-rw-r--r-- | test/pending/neg/t8079d.scala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/pending/neg/t8079d.check b/test/pending/neg/t8079d.check new file mode 100644 index 0000000000..f63f4902f8 --- /dev/null +++ b/test/pending/neg/t8079d.check @@ -0,0 +1,4 @@ +t8079d.scala:3: error: contravariant type I occurs in covariant position in type C.this.X of value b + def f2(b: X): Unit + ^ +one error found diff --git a/test/pending/neg/t8079d.scala b/test/pending/neg/t8079d.scala new file mode 100644 index 0000000000..ad420b99e3 --- /dev/null +++ b/test/pending/neg/t8079d.scala @@ -0,0 +1,4 @@ +trait C[-I] { + protected[this] type X = C[I] + def f2(b: X): Unit +} |