diff options
author | Paul Phillips <paulp@improving.org> | 2013-10-01 20:28:48 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-10-01 20:41:41 -0700 |
commit | 5708e9d73ba01c286d7155606b72caeab914face (patch) | |
tree | 422ca2158adb3392aa3826ea9ab9cae4a379f5ce /test/files/neg/run-gadts-strict.check | |
parent | 95d5554b9a263e3eb060c181463234f3e79864ab (diff) | |
download | scala-5708e9d73ba01c286d7155606b72caeab914face.tar.gz scala-5708e9d73ba01c286d7155606b72caeab914face.tar.bz2 scala-5708e9d73ba01c286d7155606b72caeab914face.zip |
SI-6680 unsoundness in gadt typing.
Introduces -Xstrict-inference to deal with the significant
gap between soundness and what presently compiles. I'm hopeful
that it's TOO strict, because it finds e.g. 75 errors compiling
immutable/IntMap.scala, but it might be that bad.
Diffstat (limited to 'test/files/neg/run-gadts-strict.check')
-rw-r--r-- | test/files/neg/run-gadts-strict.check | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/run-gadts-strict.check b/test/files/neg/run-gadts-strict.check new file mode 100644 index 0000000000..b4d36c4629 --- /dev/null +++ b/test/files/neg/run-gadts-strict.check @@ -0,0 +1,21 @@ +run-gadts-strict.scala:12: error: type mismatch; + found : n.type (with underlying type Int) + required: T + case Lit(n) => n + ^ +run-gadts-strict.scala:13: error: type mismatch; + found : Int + required: T + case Succ(u) => eval(u) + 1 + ^ +run-gadts-strict.scala:14: error: type mismatch; + found : Boolean + required: T + case IsZero(u) => eval(u) == 0 + ^ +run-gadts-strict.scala:15: error: type mismatch; + found : T(in class If) + required: T(in method eval) + case If(c, u1, u2) => eval(if (eval(c)) u1 else u2) + ^ +four errors found |