1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
object Test extends dotty.runtime.LegacyApp { val a = 1 1 match { case 2 => println("FAILED") case 1 => println("OK") case `a` => println("FAILED") } val one = 1 1 match { case 2 => println("FAILED") case `one` => println("OK") case 1 => println("FAILED") } 1 match { case 2 => println("FAILED") case Test.one => println("OK") case 1 => println("FAILED") } }