We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60f009f + 9b2c10a commit c70774cCopy full SHA for c70774c
test/files/run/t8960.scala
@@ -1,6 +1,12 @@
1
object Test extends App {
2
def test(o: AnyRef, sp: Boolean = false) = {
3
- if (sp) assert(o.getClass.getSuperclass.getName contains "$sp")
+ val isSpecialized = o.getClass.getSuperclass.getName contains "$sp"
4
+ val isDelambdafyMethod = o.getClass.getName contains "$lambda$"
5
+ assert(
6
+ // delambdafy:method doesn't currently emit specialized anonymous function classes
7
+ if (sp) (isSpecialized || isDelambdafyMethod) else !isSpecialized,
8
+ o.getClass.getName)
9
+
10
val Some(f) = o.getClass.getDeclaredFields.find(_.getName == "serialVersionUID")
11
assert(f.getLong(null) == 0l)
12
}
0 commit comments