diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:58:41 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:58:41 +0000 |
commit | 356abe3a5b76eb382eca6655624743aa16a001ae (patch) | |
tree | 6d461942fb020063e209ef022b2d0e48872aabcb /test | |
parent | aff3ddde53ad8c4d46980be3c34e13a51b6c8e7f (diff) | |
download | scala-356abe3a5b76eb382eca6655624743aa16a001ae.tar.gz scala-356abe3a5b76eb382eca6655624743aa16a001ae.tar.bz2 scala-356abe3a5b76eb382eca6655624743aa16a001ae.zip |
closes #2331: the pre-transform in Erasure did ...
closes #2331: the pre-transform in Erasure did not correctly recurse in
the case of a TypeApply.
It simply returned the function, which might very well have been, say,
a Select node, which had to be erased in case the qualifier's type is a
refinement.
(sorry about the whitespace changes)
review by odersky
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t2331.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t2331.scala b/test/files/pos/t2331.scala new file mode 100644 index 0000000000..9a15b5c2a9 --- /dev/null +++ b/test/files/pos/t2331.scala @@ -0,0 +1,11 @@ +trait C { + def m[T]: T +} + +object Test { + val o /*: C --> no crash*/ = new C { + def m[T]: Nothing /*: T --> no crash*/ = error("omitted") + } + + o.m[Nothing] +}
\ No newline at end of file |