-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: fix static init of literal contains dynamic exprs
Fixes golang#52673 Change-Id: Ib2faa5a669c05778fc6beb38c3e63d558af9b2be Reviewed-on: https://go-review.googlesource.com/c/go/+/403995 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Reviewed-by: David Chase <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// compile | ||
|
||
// Copyright 2022 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package p | ||
|
||
func f() { | ||
var x string | ||
func() [10][]bool { | ||
return [10][]bool{ | ||
[]bool{bool(x < "")}, | ||
[]bool{}, []bool{}, []bool{}, []bool{}} | ||
}() | ||
} |