Files
c3c/test/test_suite/contracts/pure.c3
2022-03-10 09:46:30 +01:00

24 lines
227 B
C

module inlineme;
/**
* @pure
*/
fn void test()
{
int x = 123;
int* y = &x;
}
int abc;
fn void test2()
{
abc = 1233;
}
/**
* @pure
*/
fn void test3()
{
abc = 1233; // #error: '@pure' functions may not access globals
}