summaryrefslogtreecommitdiff
path: root/test/files/pos/t2331.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-07-08 15:58:41 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-07-08 15:58:41 +0000
commit356abe3a5b76eb382eca6655624743aa16a001ae (patch)
tree6d461942fb020063e209ef022b2d0e48872aabcb /test/files/pos/t2331.scala
parentaff3ddde53ad8c4d46980be3c34e13a51b6c8e7f (diff)
downloadscala-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/files/pos/t2331.scala')
-rw-r--r--test/files/pos/t2331.scala11
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