diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-03-12 17:58:34 +0100 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-03-19 17:06:51 +0100 |
commit | 910a701fcc93e0663f0a6a15ac11499beb1ca6a9 (patch) | |
tree | 77e246101fc16226237b5a22a2b904908e1d7287 /test/files/neg/t5189b.check | |
parent | 78c15103d54e58b0ecd193b90e2d56b967967d6c (diff) | |
download | scala-910a701fcc93e0663f0a6a15ac11499beb1ca6a9.tar.gz scala-910a701fcc93e0663f0a6a15ac11499beb1ca6a9.tar.bz2 scala-910a701fcc93e0663f0a6a15ac11499beb1ca6a9.zip |
SI-5189: refined GADT soundness fix
extrapolate GADT skolems: only complicate types when needed
make sure we only deskolemize GADT skolems after typedCase
Diffstat (limited to 'test/files/neg/t5189b.check')
-rw-r--r-- | test/files/neg/t5189b.check | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/files/neg/t5189b.check b/test/files/neg/t5189b.check index 7f78cbb438..46996e96d0 100644 --- a/test/files/neg/t5189b.check +++ b/test/files/neg/t5189b.check @@ -1,8 +1,11 @@ -t5189b.scala:25: error: type mismatch; - found : TestNeg.Wrapped[?T2] where type ?T2 <: T +t5189b.scala:38: error: type mismatch; + found : TestNeg.Wrapped[?T7] where type ?T7 <: T (this is a GADT skolem) required: TestNeg.Wrapped[T] -Note: ?T2 <: T, but class Wrapped is invariant in type W. +Note: ?T7 <: T, but class Wrapped is invariant in type W. You may wish to define W as +W instead. (SLS 4.5) case Wrapper/*[_ <: T ]*/(wrapped) => wrapped // : Wrapped[_ <: T], which is a subtype of Wrapped[T] if and only if Wrapped is covariant in its type parameter ^ -one error found +t5189b.scala:51: error: value foo is not a member of type parameter T + case Some(xs) => xs.foo // the error message should not refer to a skolem (testing extrapolation) + ^ +two errors found |