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
It would be nice if, when calling a parenless proc as though it were a 0-argument parenful proc, the error message specifically called that out as the potential cause.
Is this issue currently blocking your progress?
no
Code Sample
proc doSomething doreturn1;
var x = doSomething(); // parenful call to parenless
Output:
mytest.chpl:1: In module 'mytest':
mytest.chpl:2: error: unresolved access of 'int(64)' by '()'
mytest.chpl:2: note: unresolved call had id 318109
Dyno output:
─── error in mytest.chpl:2 [NoMatchingCandidates] ───
Unable to resolve call to 'this': no matching candidates.
|
2 | var x = doSomething(); // parenful call to parenless
|
[long list of failed candidates]
Both errors reflect performing the parenless call, then trying to call a 0-arg parenful this proc on it. That could be what the user intended so that error output is potentially helpful. However, it's also likely the user just forgot they're calling a parenless. It would be nice for the error output to include something like:
note: perhaps you meant to call the parenless proc 'doSomething'?
The text was updated successfully, but these errors were encountered:
Summary of Feature
Description:
It would be nice if, when calling a parenless proc as though it were a 0-argument parenful proc, the error message specifically called that out as the potential cause.
Is this issue currently blocking your progress?
no
Code Sample
Output:
Dyno output:
Both errors reflect performing the parenless call, then trying to call a 0-arg parenful
this
proc on it. That could be what the user intended so that error output is potentially helpful. However, it's also likely the user just forgot they're calling a parenless. It would be nice for the error output to include something like:The text was updated successfully, but these errors were encountered: