diff --git a/go/types/testdata/stmt0.src b/go/types/testdata/stmt0.src index 255c171d..6b6349b2 100644 --- a/go/types/testdata/stmt0.src +++ b/go/types/testdata/stmt0.src @@ -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" */: - } -} \ No newline at end of file