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:
parent
ced954c167
commit
d15a452238
|
|
@ -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" */:
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue