Files
c3c/test/test_suite/macros/hash_ident.c3
Christoffer Lerno 3c15e495dd Add macro arguments &foo $foo #foo.
C ABI compatibility aarch64, win64, x86, x64
Added debug info
2020-11-22 22:16:19 +01:00

25 lines
377 B
Plaintext

macro int cofefe(#a)
{
int y = 0;
return #a + #a;
}
int abc = 1;
public func int xx()
{
abc++;
return abc;
}
public func void main()
{
define $x = 0;
int x = 0;
@cofefe(x += 1);
@cofefe(xx());
@cofefe($x += 1); // #error: Cannot modify '$x' inside of a runtime scope.
@cofefe(y += 1); // #error: Identifier 'y' could not be found.
}