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
The root cause of this is $delete is not really a method of Map (well, Map itself is not really a class to begin with...), but we use a clever @Template to make it look like it is. The method reference translation code is not @Template aware, and in this case there really isn't way to generate the corresponding code.
ST-JS should generate a compile-time error when a method reference is used on a method that carries an @Template annotation. It should also suggest the user to transform the method reference to a Lambda, which would solve the problem:
Right now, code like
would generate the following (obviously wrong) code:
The root cause of this is
$delete
is not really a method ofMap
(well,Map
itself is not really a class to begin with...), but we use a clever@Template
to make it look like it is. The method reference translation code is not@Template
aware, and in this case there really isn't way to generate the corresponding code.ST-JS should generate a compile-time error when a method reference is used on a method that carries an
@Template
annotation. It should also suggest the user to transform the method reference to a Lambda, which would solve the problem:would generate the following (now correct) code:
The text was updated successfully, but these errors were encountered: