blob: fd4babee34ef6c45a6a7e9e1881cfe56fd1bab92 (
plain) (
tree)
|
|
class Foo(val a: Int) extends AnyVal {
def foo = { {case x => x + a}: PartialFunction[Int, Int]}
def bar = (new {}).toString
}
object Test extends dotty.runtime.LegacyApp {
val x = new Foo(1).foo.apply(2)
assert(x == 3, x)
val s = new Foo(1).bar
assert(s.nonEmpty, s)
}
|