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
Snippets are matched against methods using reflection. If a method cannot be found, it is sometimes because of a signature mismatch, and useful information about this can be conveyed to the user.
The mismatch is typically either the wrong arguments, or wrong return type. (The latter can easily happen if is not declared explicitly, but inferenced by the compiler!)
Error cases can be tricky to report, because of overloading. However, if there is only a single method by the matching name, the user would benefit greatly from an error message saying that the method WAS in fact found, but it could not be used, for this reason. Simply saying that the method wasn't found is slightly misleading, and suggests that a rebuild is needed, or something.
The case of the wrong return type should be easier to report, since methods cannot be overloaded by return type only. Hence, if there is a method with the correct argument list (which should be checked for first) it could be reported as "the method you probably wanted to use".
The text was updated successfully, but these errors were encountered:
Snippets are matched against methods using reflection. If a method cannot be found, it is sometimes because of a signature mismatch, and useful information about this can be conveyed to the user.
The mismatch is typically either the wrong arguments, or wrong return type. (The latter can easily happen if is not declared explicitly, but inferenced by the compiler!)
Error cases can be tricky to report, because of overloading. However, if there is only a single method by the matching name, the user would benefit greatly from an error message saying that the method WAS in fact found, but it could not be used, for this reason. Simply saying that the method wasn't found is slightly misleading, and suggests that a rebuild is needed, or something.
The case of the wrong return type should be easier to report, since methods cannot be overloaded by return type only. Hence, if there is a method with the correct argument list (which should be checked for first) it could be reported as "the method you probably wanted to use".
The text was updated successfully, but these errors were encountered: