I found the well writen spec from Goktug Gokdogan (https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4/edit?usp=sharing)
It clarifies that method overloading only is a problem if you have a Java implementation with overloaded methods and you want to call it from Javascript. I am only consuming JS objects from Java which does not have the problem, so that is why it works fine after I disabled the check in GWT. /Rene Den onsdag den 17. december 2014 09.11.42 UTC+1 skrev rhmoller: > > Hi > > Thank you. For now I continue running a hacked version of GWT for my toy > project. It simply disables the check and everything seems to work fine for > the scenarios that I have tried out. There must be some special case where > it does not work since they have disabled it, but I have not hit any of > those yet. > > /Rene > > Den tirsdag den 16. december 2014 22.45.10 UTC+1 skrev Cristian Rinaldi: >> >> rhmoller: >> You can see in this thread >> <https://groups.google.com/forum/?hl=es-419#!searchin/google-web-toolkit-contributors/jsinterop/google-web-toolkit-contributors/DViFpz26_9Y/0BxTNzg9o_IJ>a >> >> discussion of method overloading, and the proposed support for next release >> of GWT. >> >> El viernes, 12 de diciembre de 2014 19:00:15 UTC-3, rhmoller escribió: >>> >>> Hi >>> >>> I am toying around with generating Java interfaces annotated with >>> @JsType and @JsProperty from webidl. But I have a problem with overloaded >>> methods. >>> >>> For example: The idl for CanvasRenderingContext2 has several overloaded >>> methods >>> >>> fx >>> >>> void stroke(); >>> void stroke(Path2D path); >>> >>> and >>> >>> ImageData createImageData(double sw, double sh); >>> ImageData createImageData(ImageData imagedata); >>> >>> I can generate a corresponding Java interface with the overloaded >>> methods, but the GWT compiler fails with this >>> >>> Error:(75, 0) GWT Compiler: JsType methods cannot overload another >>> method. >>> >>> I know JS does not support function overloading as such, but on the >>> other hand, you can pass anything to a js function regardless of the >>> specified parameters. >>> >>> Do you have any ideas for how I can resolve these issues? >>> >>> /Rene >>> >> -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
