mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
24 lines
227 B
C
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
|
|
} |