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
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.6.3 darwin/amd64
What did you do?
Parse the AST for any program with any if statement
Walk the tree until you find an *ast.IfStmt node
Try to find the type of the expression via the types.Info struct you processed.
What did you expect to see?
An entry of type types.Basic with kind bool.
What did you see instead?
no entry in the map
Extra
This is quite obviously not necessary as the types.Type of any ast.IfStmt.Cond is obviously types.Basic (with kind bool) but this complicates at least one piece of my code.
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
go/types Info.Types does not map ast.IfStmt.Cond
go/types: Info.Types does not map ast.IfStmt.Cond
Jul 19, 2016
Can you provide a complete standalone example (perhaps a program plus an input file) showing the problem you are describing? Code is much easier to understand than text. Thanks.
Ok turns out I can't reproduce the bug with a playground example (it compiles fine but the bug doesn't show up) I'll reopen the issue if I can find a isolated example where it didn't parse correctly.
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6.3 darwin/amd64
if
statement*ast.IfStmt
nodetypes.Info
struct you processed.An entry of type types.Basic with kind bool.
no entry in the map
This is quite obviously not necessary as the types.Type of any ast.IfStmt.Cond is obviously types.Basic (with kind bool) but this complicates at least one piece of my code.
The text was updated successfully, but these errors were encountered: