Skip to content

Commit 5f28215

Browse files
Merge pull request #6239 from dotty-staging/fix/i4523
Fix #4523: Add regression test to ensure we generate no bytecode for inline
2 parents a0c1d5a + aa10a37 commit 5f28215

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/run/i4523.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
private static final int C.foo$$anonfun$1(int)
2+
private static final void C.notfive$1(int)
3+
private static java.lang.Object C.$deserializeLambda$(java.lang.invoke.SerializedLambda)
4+
public scala.collection.Seq C.foo()

tests/run/i4523.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class C {
2+
inline def one = 1
3+
def foo = {
4+
def notfive(i: Int) = println(i)
5+
inline def five = one + 4
6+
Seq(5).map { i =>
7+
i + five
8+
}
9+
}
10+
}
11+
12+
object Test {
13+
def main(args: Array[String]): Unit = {
14+
classOf[C].getDeclaredMethods.map(_.toString).sorted.foreach(println)
15+
}
16+
}

0 commit comments

Comments
 (0)