]> Cypherpunks repositories - gostls13.git/commit
gc: better error message for bad type in channel send
authorAnthony Martin <ality@pbrane.org>
Mon, 22 Nov 2010 15:59:51 +0000 (10:59 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 22 Nov 2010 15:59:51 +0000 (10:59 -0500)
commit1ee4512b98edfadbd2e12fb983232cf08cd8b31d
tree0345e84e5038939b7400b54ac02a685bee2d52b8
parente21aac29ba179c310b4b834bc3c37f152ab20bf2
gc: better error message for bad type in channel send

# test program
1 package main
2
3 type C chan int
4
5 func F(c C) {
6  c <- true
7 }

# old error
test.go:6: cannot use true (type bool) as type int in function argument

# new error
test.go:6: cannot use true (type bool) as type int in channel send

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3231042
src/cmd/gc/typecheck.c