diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug63.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug63.scala | 3 | ||||
-rw-r--r-- | test/neg/bug63.check | 4 | ||||
-rw-r--r-- | test/neg/bug63.scala | 3 |
4 files changed, 14 insertions, 0 deletions
diff --git a/test/files/neg/bug63.check b/test/files/neg/bug63.check new file mode 100644 index 0000000000..51b7c65bd1 --- /dev/null +++ b/test/files/neg/bug63.check @@ -0,0 +1,4 @@ +bug63.scala:2: covariant type T occurs in contravariant position in type T of value elem + def set(elem: T): Unit = (); + ^ +one error found diff --git a/test/files/neg/bug63.scala b/test/files/neg/bug63.scala new file mode 100644 index 0000000000..fc33f11e61 --- /dev/null +++ b/test/files/neg/bug63.scala @@ -0,0 +1,3 @@ +class C[+T] { + def set(elem: T): Unit = (); +} diff --git a/test/neg/bug63.check b/test/neg/bug63.check new file mode 100644 index 0000000000..51b7c65bd1 --- /dev/null +++ b/test/neg/bug63.check @@ -0,0 +1,4 @@ +bug63.scala:2: covariant type T occurs in contravariant position in type T of value elem + def set(elem: T): Unit = (); + ^ +one error found diff --git a/test/neg/bug63.scala b/test/neg/bug63.scala new file mode 100644 index 0000000000..fc33f11e61 --- /dev/null +++ b/test/neg/bug63.scala @@ -0,0 +1,3 @@ +class C[+T] { + def set(elem: T): Unit = (); +} |