cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 158 forks source link

Member reference not correctly translated #483

Closed chfeiler closed 5 years ago

chfeiler commented 6 years ago

Hello!

I came accross the situation in which a Function<T, R> has to be transpiled. The functional interface is defined as follows:

SomeClass::someNonStaticMethod

The expected output of the transpiler would be:

(x) => { return x.someNonStaticMethod() }

The actual result is however:

() => { return SomeClass.someNonStaticMethod() }

The actual result will cause an error since the method is not static.

lgrignon commented 6 years ago

Indeed, +1