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
When typechecking a selector, go/types reports the column corresponding to the begin of the selector expression, rather than name being selected:
obj[whatever].missing(123)
^
gotype reports here
The compiler instead reports the missing name:
obj[whatever].missing(123)
^
compiler reports here
The compiler version seems preferable, as it better highlights where the error probably lies. For instance, this is how my editor (that uses go/types) highlights a missing method:
I prepared a quick fix and this is how it looks like once go/types matches column info with the compiler:
I will submit a CL soon.
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/104155 mentions this issue: go/types: fix column reporting of invalid selector names
rasky
changed the title
go/type: column reporting of "no field or method" seems wrong
go/types: column reporting of "no field or method" seems wrong
Apr 2, 2018
When typechecking a selector, go/types reports the column corresponding to the begin of the selector expression, rather than name being selected:
The compiler instead reports the missing name:
The compiler version seems preferable, as it better highlights where the error probably lies. For instance, this is how my editor (that uses go/types) highlights a missing method:
I prepared a quick fix and this is how it looks like once go/types matches column info with the compiler:
I will submit a CL soon.
The text was updated successfully, but these errors were encountered: