summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-11-26 13:30:15 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-11-26 13:30:15 +0000
commit7aa5ecea0baf51289fa27e0edf6f9d3eed07aa8d (patch)
tree39a3860bb6d681deeca608bb65fd1e87d9c1b817
parent370ab197f913226d73f49035894c5d26cee85ec3 (diff)
downloadscala-7aa5ecea0baf51289fa27e0edf6f9d3eed07aa8d.tar.gz
scala-7aa5ecea0baf51289fa27e0edf6f9d3eed07aa8d.tar.bz2
scala-7aa5ecea0baf51289fa27e0edf6f9d3eed07aa8d.zip
Merge branch 'inner-class-attr'
-rw-r--r--test/files/run/t1167.check3
-rw-r--r--test/files/run/t1167.scala23
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t1167.check b/test/files/run/t1167.check
new file mode 100644
index 0000000000..885d4c9e26
--- /dev/null
+++ b/test/files/run/t1167.check
@@ -0,0 +1,3 @@
+$anon$1
+$anon$2
+$anonfun$testFunc$1
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)
+}