-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
@soronpo
Description
I think below is not the expected behavior, but I'm not certain. Should the inline argument really be used as-is in every reference within the inline method?
Compiler version
v3.7.3
Minimized code
//> using scala 3.7.3 inline def foo(inline arg: Int): Unit = inline arg match case _ => println("examine1") inline arg match case _ => println("examine2") def bar: Int = println("hello") 1 @main def test = foo(bar)
Output
hello
examine1
hello
examine2
Expectation
hello
should be printed once.