This is super interesting. I'm generating an addit...
# compiler
a
This is super interesting. I'm generating an additional copy function for a data class. I'm not adding a body but one seems to be generated by itself. Is that expected?
Even generating my own body doesnt work. Renaming it to
copy2
works though
j
if it has the same amount of arguments with the same names I think it is expected
a
It does not, it has fewer
But each argument has the same name and type as one of the primary constructor
j
But the copy function has the same params as the primary one, no/
a
Not in quantity
It will contain a subset of the primary copy function
👍 1
So after looking through the code it seems that if the backend encounters a copy function without a body, it will generate one. To make matters worse it overwrites the origin so my extension didn't handle it. Luckily you can get around this by generating a dummy body