diff options
Diffstat (limited to 'tests/global/t21896.nim')
-rw-r--r-- | tests/global/t21896.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/global/t21896.nim b/tests/global/t21896.nim new file mode 100644 index 000000000..c7765c4dd --- /dev/null +++ b/tests/global/t21896.nim @@ -0,0 +1,9 @@ +discard """ + errormsg: "cannot assign local to global variable" + line: 7 +""" + +proc example(a:int) = + let b {.global.} = a + +example(1) |