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
@JsMethod(name = "noArgMethod")
public static native Object noArgMethod_STATIC();
public native Object noArgMethod();
(removed an incorrect statement, will follow up separately)
However, if both of these have a parameter which is unioned, then the generated *UnionType will be emitted twice, as the names are not distinct - unlike the actual member name, the union type's name is only based on the method name and argument name.
Additionally, once a native method is generated for this, two or more @JsOverlay methods will be generated as well, and when those are renamed to append _STATIC to them, a @JsMethod/@JsProperty annotation will also be decorated on them, which will cause a compiler error in J2CL.
There is also a separate correctness issue which I'll file separately - in some cases, there is only one unionProperty, the static variant, as the non-static member is failed to be emitted.
The text was updated successfully, but these errors were encountered:
niloc132
added a commit
to Vertispan/jsinterop-generator
that referenced
this issue
May 27, 2020
Given two members on a class, one static and one instance, one will be generated with a
_STATIC
suffix. That is,will cause this to be generated:
(removed an incorrect statement, will follow up separately)
However, if both of these have a parameter which is unioned, then the generated
*UnionType
will be emitted twice, as the names are not distinct - unlike the actual member name, the union type's name is only based on the method name and argument name.Additionally, once a native method is generated for this, two or more
@JsOverlay
methods will be generated as well, and when those are renamed to append_STATIC
to them, a@JsMethod
/@JsProperty
annotation will also be decorated on them, which will cause a compiler error in J2CL.Example js with a method:
Resulting java:
Example JS with a property:
Resulting Java:
There is also a separate correctness issue which I'll file separately - in some cases, there is only one
unionProperty
, the static variant, as the non-static member is failed to be emitted.The text was updated successfully, but these errors were encountered: