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
A test class App loses line number specificity when exception is thrown from value class. Both DelayedInit and AnyVal are required for symptom.
objectTest2extendsApp {
implicitclassAverrable(valb:Boolean) extendsAnyVal {
defyes= assert(b)
defno= assert(!b)
}
// normal line number// at gline.Test2$delayedInit$body.apply(gline.scala:19)//throw new RuntimeException// line number is start of object Test//at scala.Predef$.assert(Predef.scala:165)//at gline.Test2$Averrable$.yes$extension(gline.scala:16)//at gline.Test2$delayedInit$body.apply(gline.scala:14)false.yes
// same in new encoding//at gline.Test2$Averrable$.yes$extension(gline.scala:16)//at gline.Test2$.delayedEndpoint$gline$Test2$1(gline.scala:14)//at gline.Test2$delayedInit$body.apply(gline.scala:14)
}
And javap says:
public final void delayedEndpoint$gline$Test2$1();
flags: ACC_PUBLIC, ACC_FINALCode:
stack=3, locals=1, args_size=10: getstatic #65// Field gline/Test2$Averrable$.MODULE$:Lgline/Test2$Averrable$;3: aload_0
4: iconst_0
5: invokevirtual #67// Method Averrable:(Z)Z8: invokevirtual #71// Method gline/Test2$Averrable$.yes$extension:(Z)V11:returnLocalVariableTable:StartLengthSlotNameSignature0120thisLgline/Test2$;
LineNumberTable:
line 13:0
line 26:3
line 13:8
The text was updated successfully, but these errors were encountered:
A test class App loses line number specificity when exception is thrown from value class. Both DelayedInit and AnyVal are required for symptom.
And javap says:
The text was updated successfully, but these errors were encountered: