diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-17 17:08:26 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-17 17:08:42 +0100 |
commit | e63feffe063987df54cb9a5916003eb400c0b49d (patch) | |
tree | 2fa127537afdcdfaf0b6847232382c9c3b03275d /tests/neg/boundspropagation.scala | |
parent | a75b21b43962e809284f923741c0aa7a03499ab3 (diff) | |
download | dotty-e63feffe063987df54cb9a5916003eb400c0b49d.tar.gz dotty-e63feffe063987df54cb9a5916003eb400c0b49d.tar.bz2 dotty-e63feffe063987df54cb9a5916003eb400c0b49d.zip |
Moved pending tests that work into pos and neg.
One test (t2613) required lifting a hard recursion limit in findMember
(used for debug only, will be removed in the future). The same test
also requires -Yno-deep-subtypes to be reset, so it's in pos_special
instead of pos.
Diffstat (limited to 'tests/neg/boundspropagation.scala')
-rw-r--r-- | tests/neg/boundspropagation.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/neg/boundspropagation.scala b/tests/neg/boundspropagation.scala new file mode 100644 index 000000000..560d5416c --- /dev/null +++ b/tests/neg/boundspropagation.scala @@ -0,0 +1,26 @@ +// scalac fails for test2/3 +// dotc fails for all three +object test1 { + class Tree[-T >: Null] + + + def f(x: Any): Tree[Null] = x match { + case y: Tree[_] => y + } +} +object test2 { + class Tree[T >: Null] + + + def f(x: Any): Tree[Null] = x match { + case y: Tree[_] => y + } +} +object test3 { + class Tree[+T >: Null] + + + def f(x: Any): Tree[Null] = x match { + case y: Tree[_] => y + } +} |