diff options
Diffstat (limited to 'test/files/neg/tcpoly_variance.check')
-rw-r--r-- | test/files/neg/tcpoly_variance.check | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/neg/tcpoly_variance.check b/test/files/neg/tcpoly_variance.check new file mode 100644 index 0000000000..5fd104d607 --- /dev/null +++ b/test/files/neg/tcpoly_variance.check @@ -0,0 +1,5 @@ +tcpoly_variance.scala:6: error: error overriding method str in class A of type => m[java.lang.Object]; + method str has incompatible type => m[scala.Predef.String] + override def str: m[String] = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] + ^ +one error found |