Permalink
Browse files

SI-7482 Don't cook raw types after erasure.

  • Loading branch information...
1 parent 13b4628 commit 37884ecf9aec149a180a2e560f6a0b99145b91ea @paulp paulp committed May 17, 2013
Showing with 23 additions and 1 deletion.
  1. +1 −1 src/reflect/scala/reflect/internal/Symbols.scala
  2. +14 −0 test/files/run/t7482a.check
  3. +8 −0 test/files/run/t7482a.scala
View
2 src/reflect/scala/reflect/internal/Symbols.scala
@@ -1500,7 +1500,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
*/
def cookJavaRawInfo(): Unit = {
// only try once...
- if (this hasFlag TRIEDCOOKING)
+ if (phase.erasedTypes || (this hasFlag TRIEDCOOKING))
return
this setFlag TRIEDCOOKING
View
14 test/files/run/t7482a.check
@@ -0,0 +1,14 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
+v: java.util.ArrayList[String] = []
+
+scala> val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
+v: java.util.ArrayList[String] = []
+
+scala>
+
+scala>
View
8 test/files/run/t7482a.scala
@@ -0,0 +1,8 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ override def code = """
+ val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
+ val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
+ """
+}

0 comments on commit 37884ec

Please sign in to comment.