Commit f305d049 authored by Ian Lance Taylor's avatar Ian Lance Taylor

Bug: 6g accepts fallthrough in type switch.

R=r
CC=go-dev
http://go/go-review/1016006
parent 449086ee
// errchk $G $D/$F.go
// 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() {
var v interface{} = 0;
switch x := v.(type) {
case int:
fallthrough; // ERROR "fallthrough"
default:
panic("fell through");
}
}
......@@ -204,3 +204,6 @@ panic PC=xxx
=========== bugs/bug212.go
BUG: errchk: command succeeded unexpectedly
=========== bugs/bug213.go
BUG: errchk: command succeeded unexpectedly
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