diff --git a/source/compiler/tests/gh_668.meta b/source/compiler/tests/gh_668.meta new file mode 100644 index 0000000..6fb1bd8 --- /dev/null +++ b/source/compiler/tests/gh_668.meta @@ -0,0 +1,7 @@ +{ + 'test_type': 'output_check', + 'errors': """ +gh_668.pwn(1) : error 009: invalid array size (negative, zero or out of bounds) +gh_668.pwn(5) : error 009: invalid array size (negative, zero or out of bounds) + """ +} diff --git a/source/compiler/tests/gh_668.pwn b/source/compiler/tests/gh_668.pwn new file mode 100644 index 0000000..aff294d --- /dev/null +++ b/source/compiler/tests/gh_668.pwn @@ -0,0 +1,7 @@ +new global_array[0] = { 0 }; // error 009 + +main() +{ + new local_array[0] = { 0 }; // error 009 + return global_array[0] + local_array[0]; +}