spec: package initialization issue #25474
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The following piece of code produces different result from SPEC
Following the SPEC,
b
should be initialized beforec
, so instead of9 5 4 5
,9 4 5 5
is expected, according to the SPEC:However, if we change
a = c + b
toa = b + c
, thenb
is initialized beforec
.So it seems like the order of presence precedes the order of declaration, deviating the SPEC.
go version:
1.10.2 darwin/amd64
go env:
The text was updated successfully, but these errors were encountered: