diff options
Diffstat (limited to 'src/cmd/compile/internal/types2/resolver.go')
-rw-r--r-- | src/cmd/compile/internal/types2/resolver.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/resolver.go b/src/cmd/compile/internal/types2/resolver.go index 5c64ecdfc8..5d498b6b2b 100644 --- a/src/cmd/compile/internal/types2/resolver.go +++ b/src/cmd/compile/internal/types2/resolver.go @@ -340,7 +340,7 @@ func (check *Checker) collectObjects() { case *syntax.ConstDecl: // iota is the index of the current constDecl within the group - if first < 0 || file.DeclList[index-1].(*syntax.ConstDecl).Group != s.Group { + if first < 0 || s.Group == nil || file.DeclList[index-1].(*syntax.ConstDecl).Group != s.Group { first = index last = nil } |