New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static forwarders are missing after adding @SerialVersionUID #4804
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4804?orig=1 |
@paulp said: |
@SethTisue said: |
Josh Cough (joshcough) said: |
@magarciaEPFL said: Looks like the intention was to have The if (isStaticModule(c.symbol) || serialVUID != None || isParcelableClass) {
if (isStaticModule(c.symbol))
addModuleInstanceField
addStaticInit(jclass, c.lookupStaticCtor)
if (isTopLevelModule(c.symbol)) {
if (c.symbol.companionClass == NoSymbol)
generateMirrorClass(c.symbol, c.cunit.source)
else
log("No mirror class for module with linked class: " +
c.symbol.fullName)
}
}
else { |
@magarciaEPFL said: The corresponding A question for @dragos: is it really the case that fjbg can't emit the initial value of a static field? |
@dragos said: |
@dragos said: https://github.com/scala/scala/blob/master/src/fjbg/ch/epfl/lamp/fjbg/JConstantValueAttribute.java (there seems to be no way to initialize the initial value). I think it's straight forward to fix, but I don't know how much work you want to invest in fjbg, if it's EOL'ed. Maybe it's simple to disentangle the control-flow. |
@magarciaEPFL said:
GenASM does just that (well, in scala/scala#654 ) for First time I hear about fjbg's |
@magarciaEPFL said: |
@SethTisue said: |
@magarciaEPFL said: |
In the following code, adding @serialversionuid to the class results in the static forwarders missing from the byte code.
Here is the relevant decompiled byte code:
The text was updated successfully, but these errors were encountered: