Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 37884ecf9aec149a180a2e560f6a0b99145b91ea 1 parent 13b4628
Paul Phillips paulp authored
2  src/reflect/scala/reflect/internal/Symbols.scala
@@ -1500,7 +1500,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
1500 1500 */
1501 1501 def cookJavaRawInfo(): Unit = {
1502 1502 // only try once...
1503   - if (this hasFlag TRIEDCOOKING)
  1503 + if (phase.erasedTypes || (this hasFlag TRIEDCOOKING))
1504 1504 return
1505 1505
1506 1506 this setFlag TRIEDCOOKING
14 test/files/run/t7482a.check
... ... @@ -0,0 +1,14 @@
  1 +Type in expressions to have them evaluated.
  2 +Type :help for more information.
  3 +
  4 +scala>
  5 +
  6 +scala> val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
  7 +v: java.util.ArrayList[String] = []
  8 +
  9 +scala> val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
  10 +v: java.util.ArrayList[String] = []
  11 +
  12 +scala>
  13 +
  14 +scala>
8 test/files/run/t7482a.scala
... ... @@ -0,0 +1,8 @@
  1 +import scala.tools.partest.ReplTest
  2 +
  3 +object Test extends ReplTest {
  4 + override def code = """
  5 + val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
  6 + val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
  7 + """
  8 +}

0 comments on commit 37884ec

Please sign in to comment.
Something went wrong with that request. Please try again.