From 7aa5ecea0baf51289fa27e0edf6f9d3eed07aa8d Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Thu, 26 Nov 2009 13:30:15 +0000 Subject: Merge branch 'inner-class-attr' --- test/files/run/t1167.scala | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/files/run/t1167.scala (limited to 'test/files/run/t1167.scala') diff --git a/test/files/run/t1167.scala b/test/files/run/t1167.scala new file mode 100644 index 0000000000..a5d938c28a --- /dev/null +++ b/test/files/run/t1167.scala @@ -0,0 +1,23 @@ +/** Tests for compatible InnerClasses attribute between trait and + * impl classes, as well as anonymous classes. + */ + +trait Test1 { + def testFunc(i:Int) = ((i:Int) => i + 5)(i) +} + +abstract class Foo { + override def toString = getClass.getSimpleName + + abstract class Bar { + override def toString = getClass.getSimpleName + } +} + +object Test extends Application { + val foo = new Foo {} + val bar = new foo.Bar {} + println(foo) + println(bar) + println(Class.forName("Test1$$anonfun$testFunc$1").getSimpleName) +} -- cgit v1.2.3