aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t7571.scala
blob: fd4babee34ef6c45a6a7e9e1881cfe56fd1bab92 (plain) (tree)
1
2
3
4
5
6
7





                                                           
                                             




                                 
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)
}