-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Condition:
type
Foo = object
bar: int
proc bar(cur: Foo, val: int) =
discard cur.bar
proc does_fail(): Foo =
result.bar(5)
can_fail()This results in the following error message:
Error: in expression 'result.bar(5)': identifier expected, but found 'result.bar'
This error message needs some improvement, because it does not state, that the actual problem is, that there's an ambiguous call to bar.
The compiler cannot know whether the member bar of Foo is wanted, or whether the function bar should be called with result (of type Foo) as first argument.
lightness1024