-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
cmd/compile accepts this bit of code, while go/types and gccgo reject it as an initialization cycle ("A refers to A"):
var A = func() int {
if false {
return A
}
return 0
}()
https://play.golang.org/p/jpUoGbyJqX
Related #21750. The common issue here is probably that we're performing initialization order analysis based on the optimized/inlined functions rather than the original Go source.
/cc @griesemer
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.