From aa10a37afe13384f0776977c3723bae3a8c53a4e Mon Sep 17 00:00:00 2001 From: Aleksander Boruch-Gruszecki Date: Thu, 4 Apr 2019 18:03:51 +0200 Subject: [PATCH] Fix #4523: ensure we generate no bytecode for inline --- tests/run/i4523.check | 4 ++++ tests/run/i4523.scala | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/run/i4523.check create mode 100644 tests/run/i4523.scala diff --git a/tests/run/i4523.check b/tests/run/i4523.check new file mode 100644 index 000000000000..9710c14ba5bc --- /dev/null +++ b/tests/run/i4523.check @@ -0,0 +1,4 @@ +private static final int C.foo$$anonfun$1(int) +private static final void C.notfive$1(int) +private static java.lang.Object C.$deserializeLambda$(java.lang.invoke.SerializedLambda) +public scala.collection.Seq C.foo() diff --git a/tests/run/i4523.scala b/tests/run/i4523.scala new file mode 100644 index 000000000000..478c94ac8391 --- /dev/null +++ b/tests/run/i4523.scala @@ -0,0 +1,16 @@ +class C { + inline def one = 1 + def foo = { + def notfive(i: Int) = println(i) + inline def five = one + 4 + Seq(5).map { i => + i + five + } + } +} + +object Test { + def main(args: Array[String]): Unit = { + classOf[C].getDeclaredMethods.map(_.toString).sorted.foreach(println) + } +}