3 // Copyright 2022 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test that identifiers in implicit (omitted) RHS
8 // expressions of constant declarations are resolved
9 // in the correct context; see issues #49157, #53585.
19 B // 1 (iota is declared locally on prev. line)
22 if A != 0 || B != 1 || C != 1 {
23 println("got", A, B, C, "want 0 1 1")
32 if X != 4 || Y != 8 || Z != 1 {
33 println("got", X, Y, Z, "want 4 8 1")