Skip to content

Commit b5a7efe

Browse files
committed
add a test to ensure we are finding cyclic global variable dependencies
1 parent c56ddd1 commit b5a7efe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_global_var_cycle.zion

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# test: fail,noprelude
2+
# expect: could not figure out how to resolve circular dependency
3+
4+
let x = y as Int
5+
let y = z as Int
6+
let z = x as Int
7+
8+
fn main() {
9+
__builtin_print_int(y)
10+
}

0 commit comments

Comments
 (0)