Open sigmundch opened 5 years ago
The issue derives from the fact that the factory was created using non-elided parameters (derived from entity.parameterStructure
), but the call was passing values for all parameters (elided or not)
Because the code invoking the factory is the same used to invoke native static methods (which cannot elide parameters), I believe we need to explicitly pass all parameters.
@johnniwinther - Question for you - isn't that true also for non-static external js-interop methods? We seem to be filtering out the elided parameters there too.
I landed a quick fix, but @johnniwinther - please take a look. Looking more closely it is possible that:
Static native methods shouldn't allow named parameters but we might not currently enforce this fully; there is no check for native methods and the check for js-interop method might be incomplete.
Since named parameters are only supported for factory constructors on anonymous classes there is nothing to optimize; we already only pass the parameters given at the call site.
repro:
produces this
H.printString(H.S({bottom: 21, left: 88, right: 20, top: 24}));
instead of
H.printString(H.S({bottom: 21, right: 88, top: 24}));