From ef536f00d9d480f28db3093b9dc09a90041cfb74 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 25 Jun 2015 09:45:27 +0200 Subject: Enable 61 tests that succeed. --- tests/run/t7571.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/run/t7571.scala (limited to 'tests/run/t7571.scala') diff --git a/tests/run/t7571.scala b/tests/run/t7571.scala new file mode 100644 index 000000000..fd4babee3 --- /dev/null +++ b/tests/run/t7571.scala @@ -0,0 +1,12 @@ +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) +} -- cgit v1.2.3