aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/tcpoly_variance.check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/tcpoly_variance.check')
-rw-r--r--tests/untried/neg/tcpoly_variance.check5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/untried/neg/tcpoly_variance.check b/tests/untried/neg/tcpoly_variance.check
new file mode 100644
index 000000000..c0dfcac2d
--- /dev/null
+++ b/tests/untried/neg/tcpoly_variance.check
@@ -0,0 +1,5 @@
+tcpoly_variance.scala:6: error: overriding method str in class A of type => m[Object];
+ method str has incompatible type
+ override def str: m[String] = sys.error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object]
+ ^
+one error found