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
mateusz834
changed the title
go/types: missing error on an edge-case with continue/break
go/types: missing error on an edge-case with continue/break with labels
Dec 23, 2024
@adonovan I am working on a POC go/* fork tgoast, with a HTML-like syntax (it is a superset of Go, Go is a valid tgo (working name)). As I try to get the fork of types working, something told me that the current logic seemed wrong, after a few attempts, this bug came to my mind.
Once again, because i am poking around with
go/types
internals, i have spotted a bug in the type-checker.The code below type-checks without any error:
This happens because
lstmt
:go/src/go/types/labels.go
Line 169 in b9955f0
is assigned and never cleared, thus:
go/src/go/types/labels.go
Lines 234 to 236 in b9955f0
is executed with a wrong label (for the second for statement).
CC @adonovan @griesemer
The text was updated successfully, but these errors were encountered: