We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a9a8c0 commit e057680Copy full SHA for e057680
src/cmd/compile/internal/gc/typecheck.go
@@ -2027,6 +2027,7 @@ func typecheck1(n *Node, top int) *Node {
2027
typecheckslice(n.Ninit.Slice(), Etop)
2028
decldepth++
2029
n.Left = typecheck(n.Left, Erv)
2030
+ n.Left = defaultlit(n.Left, nil)
2031
if n.Left != nil {
2032
t := n.Left.Type
2033
if t != nil && !t.IsBoolean() {
@@ -2041,6 +2042,7 @@ func typecheck1(n *Node, top int) *Node {
2041
2042
ok |= Etop
2043
2044
2045
2046
2047
2048
0 commit comments