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
A NumFields(): 2
B NumFields(): 2
C NumFields(): 2
What did you see instead?
A NumFields(): 2
B NumFields(): 2
C NumFields(): 1
This example deliberately does not type-check. So I realise the information returned by go/types is best-effort. But the problem with the *go/types.Struct returned for C is that it's partially complete, and I have no way of telling.
Would it be possible to return the correct number of fields in this situation and have the field that does not type check be of an invalid type?
griesemer
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
May 29, 2018
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/wedrTlVT2kD
What did you expect to see?
Ideally I would like to see:
What did you see instead?
This example deliberately does not type-check. So I realise the information returned by
go/types
is best-effort. But the problem with the*go/types.Struct
returned forC
is that it's partially complete, and I have no way of telling.Would it be possible to return the correct number of fields in this situation and have the field that does not type check be of an invalid type?
/cc @griesemer @mvdan
The text was updated successfully, but these errors were encountered: