File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
compiler/test/dotty/tools/backend/jvm Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -310,4 +310,29 @@ class TestBCode extends DottyBytecodeTest {
310
310
assertTrue(callMagic)
311
311
}
312
312
}
313
+
314
+ @ Test def i4172 = {
315
+ val source =
316
+ """ class Test {
317
+ | transparent def foo(first: Int*)(second: String = "") = {}
318
+ |
319
+ | def test = {
320
+ | foo(1)()
321
+ | }
322
+ |}
323
+ """ .stripMargin
324
+
325
+ checkBCode(source) { dir =>
326
+ val moduleIn = dir.lookupName(" Test.class" , directory = false )
327
+ val moduleNode = loadClassNode(moduleIn.input)
328
+ val method = getMethod(moduleNode, " test" )
329
+
330
+ val fooInvoke = instructionsFromMethod(method).exists {
331
+ case inv : Invoke => inv.name == " foo"
332
+ case _ => false
333
+ }
334
+
335
+ assert(! fooInvoke, " foo should not be called\n " )
336
+ }
337
+ }
313
338
}
You can’t perform that action at this time.
0 commit comments