Open builder-main opened 10 months ago
Thanks - I think extensions are also part of other feature. Off top of my head there were some more issues with that unfortunately.
I think especially for rewritten code where YourType would end up YourType_Patched and extension method will complain.
We could probably cast it to (ProperType)(dynamic)variable. That's a hack for compiler as your variable is still of old type, same approach is used for something else already (I think for 'this' rewritting)
Is it not possible for rewriting extension methods yet now? Currently I’m working with one ECS framework of Unity, and it uses extension method almost everywhere :(
sorry, I've not had a chance to get to it. I could point you in the right direction if you want to give that a try
Is it not possible for rewriting extension methods yet now? Currently I’m working with one ECS framework of Unity, and it uses extension method almost everywhere :(
There is the workaround in the meantime with classical static method syntax. Making a specific rewriter is a feasible task even for newcomers, you could look at the examples and try make a PR if this is a subject that is bothering you a lot.
Hi, let's try to make a rewriter for extension methods. It would allow to avoid ambiguous call compilation errors :