Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
toolchain
/
llvm-project
/
81fe1fbf4abd00b24e078a80cb15a2d2c1343f11
/
.
/
llgo
/
test
/
execution
/
switch
/
scope.go
blob: 73bab3cd747422a65f8e9d4033135370101f8933 [
file
] [
log
] [
blame
]
// 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)
}
}