go.tools/go/types: move new switch test case in the right place (cleanup)

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/69000047
This commit is contained in:
Robert Griesemer 2014-02-27 10:46:04 -08:00
parent ced954c167
commit d15a452238
1 changed files with 8 additions and 10 deletions

View File

@ -372,6 +372,14 @@ func switches0() {
case 1 /* ERROR "cannot convert" */ :
}
true := "false"
_ = true
// A tagless switch is equivalent to the bool
// constant true, not the identifier 'true'.
switch {
case "false" /* ERROR "cannot convert" */:
}
switch int32(x) {
case 1, 2:
case x /* ERROR "cannot compare" */ :
@ -742,13 +750,3 @@ func expression_statements(ch chan int) {
cap /* ERROR "not used" */ (ch)
println /* ERROR "must be called" */
}
func _() {
true := "false"
_ = true
// A tagless switch is equivalent to the bool
// constant true, not the identifier 'true'.
switch {
case "false" /* ERROR "cannot convert" */:
}
}