Commit c6e316a4 authored by Russ Cox's avatar Russ Cox

gc: handle _ = <-c in select.

Fixes #238.

R=ken2
https://golang.org/cl/163098
parent 05a1eb1a
......@@ -118,7 +118,7 @@ walkselect(Node *sel)
else {
// introduce temporary until we're sure this will succeed.
tmp = nod(OXXX, N, N);
tempname(tmp, n->left->type);
tempname(tmp, n->right->type->type);
a = nod(OADDR, tmp, N);
}
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
......
// $G $D/$F.go && $L $F.$A && ./$A.out
// Copyright 2009 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 main
func main() {
c := make(chan bool, 1);
select {
case _ = <-c:
panic("BUG: recv should not");
default:
}
c <- true;
select {
case _ = <-c:
default:
panic("BUG: recv should");
}
}
......@@ -142,10 +142,6 @@ panic PC=xxx
== bugs/
=========== bugs/bug218.go
<epoch>: fatal error: dowidth: unknown type: blank
BUG: bug218
=========== bugs/bug219.go
bugs/bug219.go:16: syntax error near if
BUG: bug219
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment