]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix strict tree property for AST for OAS2RECV nodes.
authorLuuk van Dijk <lvd@golang.org>
Mon, 22 Oct 2012 08:01:14 +0000 (10:01 +0200)
committerLuuk van Dijk <lvd@golang.org>
Mon, 22 Oct 2012 08:01:14 +0000 (10:01 +0200)
commite7f89fcb1cdd5fc41377108fcaad2363d4456b24
treeb98a105e735fbdfeefa5e7fbae69499e41524edd
parent9714691a3f1862f09cd8d8536131c01c15ab32c3
cmd/gc: fix strict tree property for AST for OAS2RECV nodes.

in typecheck and walk, conversion from OAS2RECV to OAS2
and to OSELRECV2 duplicated the ->rlist->n to ->right
thereby destroying the strict tree-ness of the AST (up to
ONAMES) of course.  Several recursions in esc.c and inl.c
and probably elsewhere assume nodes of the tree aren't duplicated.
rather than defensively code around this, i'd rather assert
these cases away and fix their cause.

(this was tripped in 6741044)

R=rsc
CC=golang-dev
https://golang.org/cl/6750043
src/cmd/gc/select.c
src/cmd/gc/typecheck.c