Initial commit of llgo.
llvm-svn: 222857
diff --git a/llgo/test/execution/switch/scope.go b/llgo/test/execution/switch/scope.go
new file mode 100644
index 0000000..73bab3c
--- /dev/null
+++ b/llgo/test/execution/switch/scope.go
@@ -0,0 +1,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)
+ }
+}