google / jsinterop-generator

Generates Java annotated with JsInterop from JavaScript extern sources
Apache License 2.0
75 stars 24 forks source link

Support instance member overriding a static member with union types #48

Closed niloc132 closed 4 years ago

niloc132 commented 4 years ago

Proposed fix to disambiguate the generated union type for a static and instance member with the same name (and for a method, with the same param name). A nicer fix might be where the enclosing type only takes a single union type for the given method name plus arg name plus types, so that it could be reused, but this is not a general fix.

It could also perhaps be possible to reorder MembersClassCleaner and UnionTypeHelperTypeCreator in VisitorHelper (so that _STATIC is already appended and could be used when generating the union type), but there seem to be other dependencies on the order as it is.

Fixes #46

Does not address #47.

niloc132 commented 4 years ago

Are there changes or improved tests you'd like to see in this?

gkdn commented 4 years ago

Julien is OoO for 2 weeks. I recommend pinging him again when he comes back.

niloc132 commented 4 years ago

Thanks, will do!

niloc132 commented 4 years ago

Hey guys, checking in again on this, other issues filed - anything you'd like to see in this changeset to get it ready, or a better approach to handle this issue?