summaryrefslogtreecommitdiff
path: root/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-01-20 23:20:26 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-03-11 12:53:35 -0700
commit4e982451decdc3821febfe975e1b8e406a3741e8 (patch)
tree95438438c6cd166b68418e765d8d599bb6a91573 /test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala
parent37c91654433a12249ae125b9454ba17cef103327 (diff)
downloadscala-4e982451decdc3821febfe975e1b8e406a3741e8.tar.gz
scala-4e982451decdc3821febfe975e1b8e406a3741e8.tar.bz2
scala-4e982451decdc3821febfe975e1b8e406a3741e8.zip
Don't crash the inliner in mixed compilation
In mixed compilation, the bytecode of Java classes is not availalbe: the Scala compiler does not produce any, and there are no classfiles yet. When inlining a (Scala defined) method that contains an invocation to a Java method, we need the Java method's bytecode in order to check whether that invocation can be transplanted to the new location without causing an IllegalAccessError. If the bytecode cannot be found, inlining won't be allowed.
Diffstat (limited to 'test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala')
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala
index 65c96226ff..f7c9cab284 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala
@@ -90,7 +90,7 @@ class BTypesFromClassfileTest {
clearCache()
val fromSymbol = classBTypeFromSymbol(classSym)
clearCache()
- val fromClassfile = bTypes.classBTypeFromParsedClassfile(fromSymbol.internalName)
+ val fromClassfile = bTypes.classBTypeFromParsedClassfile(fromSymbol.internalName).get
sameBType(fromSymbol, fromClassfile)
}