I’m seeing some weird bytecode generated by the ne...
# compiler
z
I’m seeing some weird bytecode generated by the new IR backend with kotlin 1.4.20-RC: Some default method overloads (named like
foo$default
) were generated as
synthetic
and non-final methods without the IR backend, but are now generated as final and non-synthetic (+final, -synthetic). Does anyone know if this is intentional?
I am happy to try to file a bug for either of these, but I haven’t been able to come up with a minimal repro case. If anyone from the IR backend team is looking at this, the project that is showing this issue is https://github.com/square/workflow-kotlin which you should already have in your test suite, and I’m seeing both these issues in the
workflow-core
module.
These don’t seem like actual problems, but i’m wary of the bytecode changing for no reason, especially when new methods are getting added for no reason I can see.
d
cc @udalov
🙏 1
u
Thanks for the report! We’ll investigate. Could you please share the full class/function name that leads to
$default
being generated with incorrect flags? Regarding the
$annotations
methods: those are needed to store & load annotations on properties. The
foo$annotations
method should be present if and only if the
foo
property has some non-SOURCE-retained annotations. If this doesn’t hold, it’s a bug, and in that case please also share the full name of the property, so that we could take a look.
z
I'll get you the details and the diff in a bit (not at my computer at the moment). Did this annotations requirement change with the IR backend? I'm seeing these new methods generated without any source code changes, just enabling the IR backend.
I filed a bug, with more complete repro instructions and a diff of the changed methods here: https://youtrack.jetbrains.com/issue/KT-43145
Thanks for investigating - let me know if you need any more information or if I can do anything else to help!
👍 1
🙏 1