Skip to content

Commit

Permalink
Merge pull request scala#4110 from lrytz/t8960-delambdafy
Browse files Browse the repository at this point in the history
Make t8960 pass under delambdafy:method
  • Loading branch information
retronym committed Nov 10, 2014
2 parents 60f009f + 9b2c10a commit c70774c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/files/run/t8960.scala
@@ -1,6 +1,12 @@
object Test extends App {
def test(o: AnyRef, sp: Boolean = false) = {
if (sp) assert(o.getClass.getSuperclass.getName contains "$sp")
val isSpecialized = o.getClass.getSuperclass.getName contains "$sp"
val isDelambdafyMethod = o.getClass.getName contains "$lambda$"
assert(
// delambdafy:method doesn't currently emit specialized anonymous function classes
if (sp) (isSpecialized || isDelambdafyMethod) else !isSpecialized,
o.getClass.getName)

val Some(f) = o.getClass.getDeclaredFields.find(_.getName == "serialVersionUID")
assert(f.getLong(null) == 0l)
}
Expand Down

0 comments on commit c70774c

Please sign in to comment.