Closed MEmanuelsson closed 2 months ago
Thanks for the report.
This happens when you have a type with a primary constructor and you do something that makes Metalama transform it into a regular constructor (e.g. using AddInitializer
). So this gives you an alternative workaround (continuing to use 2024.0 is of course reasonable as well).
We will work on fixing this, and will let you know here when that's done (likely this week).
This bug has been fixed in Metalama 2024.1.13 and 2024.2.2-preview.
We tried to upgrade to the latest version of Metalama (2024.1.12) this morning but all of a sudden some classes affected by Metalama aspects wasn't compiling anymore.
Following the suggested path in the exception message (The most likely cause of the compilation failure is a bug in Metalama. Please report the issue to the Metalama support team. To facilitate troubleshooting, build the project with the option '-p:MetalamaDebugTransformedCode=True', inspect the transformed files in 'obj/Debug/.../metalama'and report the relevant files or snippets.) we see that a couple of constants in the transformed file not look right anymore.
This code in the class:
looks like this in the file found under /obj/Debug/...metalama:
Reverted back to 2024.0.12 for now, looking forward to a solution to this issue. /Martin