summaryrefslogtreecommitdiff
path: root/test/files/run/delambdafyLambdaClassNames/Test.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2014-09-10 13:59:03 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2014-09-12 12:07:42 +0200
commit63207e115a46634d47446a87a7f4bc3c2651b0e7 (patch)
treeb5b79a9faa7b2e9e9f1cbe56723374fe1508e0b5 /test/files/run/delambdafyLambdaClassNames/Test.scala
parent2ac6dc03088ecec871838d23aeb688d0e3d4eefb (diff)
downloadscala-63207e115a46634d47446a87a7f4bc3c2651b0e7.tar.gz
scala-63207e115a46634d47446a87a7f4bc3c2651b0e7.tar.bz2
scala-63207e115a46634d47446a87a7f4bc3c2651b0e7.zip
isAnonymousClass/Function for delambdafy classes is not true
Ydelambdafy:method lambda classes are not anonymous classes, and not anonymous function classes either. They are somethig new, so there's a new predicate isDelambdafyFunction. They are not anonymous classes (or functions) because anonymous classes in Java speak are nested. Delambdafy classes are always top-level, they are just synthetic. Before this patch, isAnonymous was sometimes accidentailly true: if the lambda is nested in an anonymous class. Now it's always false.
Diffstat (limited to 'test/files/run/delambdafyLambdaClassNames/Test.scala')
-rw-r--r--test/files/run/delambdafyLambdaClassNames/Test.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/run/delambdafyLambdaClassNames/Test.scala b/test/files/run/delambdafyLambdaClassNames/Test.scala
new file mode 100644
index 0000000000..49a397d1d2
--- /dev/null
+++ b/test/files/run/delambdafyLambdaClassNames/Test.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ val c = Class.forName("A$$nestedInAnon$1$lambda$$run$1")
+ println(c.getName)
+}