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
At a high-level, the problem is that a method reference that's not solvable is basically equivalent to a lambda, but unlike a lambda it doesn't come with an arity. So, we have no way to decide what the type should be. In #290, I arbitrarily chose java.util.Supplier<?>, which is correct for the example there (and prevents crashes), but will cause the output not to be compilable if the method reference has a different arity.
I also manually confirmed that if I change the arity, we do have the ability to detect the problem in JavaTypeCorrect (we get a incompatible types: invalid method reference error). I think we can probably solve this problem in a general way by writing code in JavaTypeCorrect to handle that error.
The text was updated successfully, but these errors were encountered:
At a high-level, the problem is that a method reference that's not solvable is basically equivalent to a lambda, but unlike a lambda it doesn't come with an arity. So, we have no way to decide what the type should be. In #290, I arbitrarily chose
java.util.Supplier<?>
, which is correct for the example there (and prevents crashes), but will cause the output not to be compilable if the method reference has a different arity.I also manually confirmed that if I change the arity, we do have the ability to detect the problem in JavaTypeCorrect (we get a
incompatible types: invalid method reference
error). I think we can probably solve this problem in a general way by writing code in JavaTypeCorrect to handle that error.The text was updated successfully, but these errors were encountered: