Russ Cox | 2b1c9b4 | 2012-02-16 23:49:30 -0500 | [diff] [blame^] | 1 | // errorcheck |
Ian Lance Taylor | f305d04 | 2009-10-29 15:41:02 -0700 | [diff] [blame] | 2 | |
| 3 | // Copyright 2009 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package main |
| 8 | func main() { |
| 9 | var v interface{} = 0; |
Luuk van Dijk | aac144b | 2011-11-04 17:03:50 +0100 | [diff] [blame] | 10 | switch v.(type) { |
Ian Lance Taylor | f305d04 | 2009-10-29 15:41:02 -0700 | [diff] [blame] | 11 | case int: |
| 12 | fallthrough; // ERROR "fallthrough" |
| 13 | default: |
| 14 | panic("fell through"); |
| 15 | } |
| 16 | } |