blob: 73bab3cd747422a65f8e9d4033135370101f8933 [file] [log] [blame]
Peter Collingbournead9841e2014-11-27 00:06:42 +00001// RUN: llgo -o %t %s
2// RUN: %t 2>&1 | FileCheck %s
3
4// CHECK: 1
5// CHECK-NEXT: 2
6
7package main
8
9func main() {
10 // case clauses have their own scope.
11 switch {
12 case true, false:
13 x := 1
14 println(x)
15 fallthrough
16 default:
17 x := 2
18 println(x)
19 }
20}