scope.go 253 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // RUN: llgo -o %t %s // RUN: %t 2>&1 | FileCheck %s // CHECK: 1 // CHECK-NEXT: 2 package main func main() { // case clauses have their own scope. switch { case true, false: x := 1 println(x) fallthrough default: x := 2 println(x) } }