summaryrefslogtreecommitdiff
path: root/test/files/neg/t2712-2.check
diff options
context:
space:
mode:
authorMiles Sabin <miles@milessabin.com>2016-05-20 12:49:25 +0100
committerMiles Sabin <miles@milessabin.com>2016-05-24 08:46:40 +0100
commit892a6d6878accb67e3fe68aefaa256396db05a90 (patch)
tree89024c06147fddf825904bc5891e1ee2cbf4c2d1 /test/files/neg/t2712-2.check
parent207e32df30fd733e4dd1cb28fb8cb5c3153c21a6 (diff)
downloadscala-892a6d6878accb67e3fe68aefaa256396db05a90.tar.gz
scala-892a6d6878accb67e3fe68aefaa256396db05a90.tar.bz2
scala-892a6d6878accb67e3fe68aefaa256396db05a90.zip
SI-2712 Add support for higher order unification
Diffstat (limited to 'test/files/neg/t2712-2.check')
-rw-r--r--test/files/neg/t2712-2.check13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t2712-2.check b/test/files/neg/t2712-2.check
new file mode 100644
index 0000000000..ea19e33e2c
--- /dev/null
+++ b/test/files/neg/t2712-2.check
@@ -0,0 +1,13 @@
+t2712-2.scala:16: error: type mismatch;
+ found : test.Foo
+ required: test.Two[test.X1,Object]
+Note: test.X2 <: Object (and test.Foo <: test.Two[test.X1,test.X2]), but trait Two is invariant in type B.
+You may wish to define B as +B instead. (SLS 4.5)
+ test1(foo): One[X3] // fails with -Ypartial-unification enabled
+ ^
+t2712-2.scala:16: error: type mismatch;
+ found : test.Two[test.X1,Object]
+ required: test.One[test.X3]
+ test1(foo): One[X3] // fails with -Ypartial-unification enabled
+ ^
+two errors found