summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-06-25 16:53:46 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-06-26 11:27:22 +0200
commit0a25d8b9f874334bff716f76e71fa4e4a50d43a6 (patch)
treed00db146b52452787a54e9c8cb673d36ec381ad1
parentc8e7fdcfb20a2c9bf7345c998b2a2a4c174c4ebc (diff)
downloadscala-0a25d8b9f874334bff716f76e71fa4e4a50d43a6.tar.gz
scala-0a25d8b9f874334bff716f76e71fa4e4a50d43a6.tar.bz2
scala-0a25d8b9f874334bff716f76e71fa4e4a50d43a6.zip
SI-6613 fixed in GenBCode
It was fixed in GenASM in 44807a7852.
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala3
-rw-r--r--test/files/res/t6613.check (renamed from test/pending/res/t6613.check)0
-rw-r--r--test/files/res/t6613.res (renamed from test/pending/res/t6613.res)0
-rw-r--r--test/files/res/t6613/Broken.scala (renamed from test/pending/res/t6613/Broken.scala)0
-rw-r--r--test/files/res/t6613/Enummy.java (renamed from test/pending/res/t6613/Enummy.java)0
5 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
index 6aa3a62295..23e0a4e17a 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
@@ -329,7 +329,8 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
// If the `sym` is a java module class, we use the java class instead. This ensures that we
// register the class (instead of the module class) in innerClassBufferASM.
// The two symbols have the same name, so the resulting internalName is the same.
- val classSym = if (sym.isJavaDefined && sym.isModuleClass) sym.linkedClassOfClass else sym
+ // Phase travel (exitingPickler) required for SI-6613 - linkedCoC is only reliable in early phases (nesting)
+ val classSym = if (sym.isJavaDefined && sym.isModuleClass) exitingPickler(sym.linkedClassOfClass) else sym
getClassBTypeAndRegisterInnerClass(classSym).internalName
}
diff --git a/test/pending/res/t6613.check b/test/files/res/t6613.check
index bbd9331b16..bbd9331b16 100644
--- a/test/pending/res/t6613.check
+++ b/test/files/res/t6613.check
diff --git a/test/pending/res/t6613.res b/test/files/res/t6613.res
index e3fa000fdd..e3fa000fdd 100644
--- a/test/pending/res/t6613.res
+++ b/test/files/res/t6613.res
diff --git a/test/pending/res/t6613/Broken.scala b/test/files/res/t6613/Broken.scala
index 9bcd12dbe1..9bcd12dbe1 100644
--- a/test/pending/res/t6613/Broken.scala
+++ b/test/files/res/t6613/Broken.scala
diff --git a/test/pending/res/t6613/Enummy.java b/test/files/res/t6613/Enummy.java
index 1863ef1297..1863ef1297 100644
--- a/test/pending/res/t6613/Enummy.java
+++ b/test/files/res/t6613/Enummy.java