You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that optional and named parameters in extension methods aren't functioning correctly.
publicclassFoo {}
@ExtensionpublicclassFooExt {
publicstaticStringtest(@ThisFoofoo, Stringbar="", Stringfoobar){
returnbar + foobar;
}
}
newFoo().test("bar", "foobar"); // OKnewFoo().test(bar:"bar", foobar:"foobar"); // NOK when using using named parametersnewFoo().test(foobar:"foobar"); // NOK when only supplying required parameter
The text was updated successfully, but these errors were encountered:
EotT123
pushed a commit
to EotT123/manifold-test
that referenced
this issue
Apr 19, 2025
I've fixed the example, I forgot to add a default value for one of the parameters.
The following warning is also displayed: Maybe missing '@This' to declare an instance extension method?". The first parameter is clearly annotated with @This, but while using the debugger, I noticed that the annotation isn't present in the generated code.
It appears that optional and named parameters in extension methods aren't functioning correctly.
The text was updated successfully, but these errors were encountered: