aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/checker/tests/unreachable_code.vv
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/vlib/v/checker/tests/unreachable_code.vv')
-rw-r--r--v_windows/v/vlib/v/checker/tests/unreachable_code.vv8
1 files changed, 8 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/checker/tests/unreachable_code.vv b/v_windows/v/vlib/v/checker/tests/unreachable_code.vv
new file mode 100644
index 0000000..7da480f
--- /dev/null
+++ b/v_windows/v/vlib/v/checker/tests/unreachable_code.vv
@@ -0,0 +1,8 @@
+fn foo() int {
+ return if 1 == 1 { 1 } else { 2 }
+ a := 1
+ println(a)
+}
+fn main() {
+ foo()
+}