Closed travelbasys closed 5 years ago
Oops... Forgot to mention: I am using Eclipse Neon and the JSweet and Maven plugins.
Got it!
System.out.print
causes the above problem. But
System.out.println
does not.
Whatever the reasons.
PS: Sorry if this is in the wrong forum: jsweet might be the correct one.
Yes, that's indeed a JSweet issue :)
As you can see in the default adapter, only println
is supported.
This sort of partial support is kind of historic. In theory, all this should be done in the RemoveJavaDependenciesAdapter
. Also it is quite easy to develop your own adapter to support it and extend JSweet for your own needs.
To make it right, I think we should move the println
support to RemoveJavaDependenciesAdapter
and add the print
support there...
To avoid regressions, we can just add print
support next to println
support for now and move them in the next major release.
To be moved to JSweet.
Works on last JSweet Eclipse plugin version
Hello. I am using the jsweet-quickstart project downloaded from GitHub.
I wrote another simple class:
After compiling I got the following SimpleTest.js:
I was quite impressed, how cleverly the StringBuilder.append method is emulated. But: System.out.print is just converted to java.lang.System.out.print. My Browser (Chrome) then complains in the developer console:
Thanks for advice.