diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/variances.check | 4 | ||||
-rw-r--r-- | test/files/neg/variances.scala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/variances.check b/test/files/neg/variances.check new file mode 100644 index 0000000000..a01d0e1e61 --- /dev/null +++ b/test/files/neg/variances.check @@ -0,0 +1,4 @@ +variances.scala:2: covariant type a occurs in contravariant position in type Vector[a] of value x + def append(x: Vector[a]): Vector[a] + ^ +one error found diff --git a/test/files/neg/variances.scala b/test/files/neg/variances.scala new file mode 100644 index 0000000000..ebcba21611 --- /dev/null +++ b/test/files/neg/variances.scala @@ -0,0 +1,4 @@ +trait Vector[+a] { + def append(x: Vector[a]): Vector[a] +} + |