You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classBees {
deff:PartialFunction[Bee, Unit] = { caseBee(_) =>"" }
f(newBee("buzz"))
caseclassBee(value: String)
// object Bee // With this it works
}
objectTest {
defmain(args: Array[String]):Unit= {
newBees
}
}
fails with
Causedby: java.lang.NullPointerException
at Bees.Bees$f$$f$$anonfun$1$1(i2396.scala:6)
at Bees$$anonfun$1.apply(i2396.scala:6)
at Bees$$anonfun$1.apply(i2396.scala:6)
at Bees.<init>(i2396.scala:9)
at Test$.main(i2396.scala:17)
at Test.main(i2396.scala)
where the bytecode has
publicclassBees {
publicfinalBees.Bee$Bee$lzy1;
publicBees() {
this.f().apply(newBees.Bee(this, "buzz"));
this.Bee$lzy1 = newBees.Bee$(this); // should be lazy
}
publicfinalBees.Bee$Bee() { returnthis.Bee$lzy1; } // should be initialized in here if needed
...
}
The text was updated successfully, but these errors were encountered:
fails with
where the bytecode has
The text was updated successfully, but these errors were encountered: