aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-10 01:23:33 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-16 16:04:42 +0200
commit58a6c76019bde728dcfe43bd6a7c682cc33d71ee (patch)
tree2fc938669c4a024dc9f64c7e350b2d0b6db5e972 /src
parent7a347a0c9b9e6c1030eff7d994bf3c502ee8d297 (diff)
downloaddotty-58a6c76019bde728dcfe43bd6a7c682cc33d71ee.tar.gz
dotty-58a6c76019bde728dcfe43bd6a7c682cc33d71ee.tar.bz2
dotty-58a6c76019bde728dcfe43bd6a7c682cc33d71ee.zip
Force loading LambdaMetaFactory.
Common interface with scalac tries not to load it it wasn't loaded already. We need it.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index 1df564688..afe9b6f77 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -103,6 +103,10 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
val BoxesRunTimeModule = ctx.requiredModule("scala.runtime.BoxesRunTime")
val BoxesRunTimeClass = toDenot(BoxesRunTimeModule).moduleClass.asClass
+ // require LambdaMetafactory: scalac uses getClassIfDefined, but we need those always.
+ override lazy val LambdaMetaFactory = ctx.requiredClass("java.lang.invoke.LambdaMetafactory")
+ override lazy val MethodHandle = ctx.requiredClass("java.lang.invoke.MethodHandle")
+
val nme_valueOf: Name = StdNames.nme.valueOf
val nme_apply = StdNames.nme.apply
val NothingClass: Symbol = defn.NothingClass