mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
$alignof, $offsetof and $nameof can now be used in $defined.
This commit is contained in:
10
test/test_suite/compile_time_introspection/defined_nameof.c3
Normal file
10
test/test_suite/compile_time_introspection/defined_nameof.c3
Normal file
@@ -0,0 +1,10 @@
|
||||
import std;
|
||||
alias Foo = fn void();
|
||||
|
||||
fn int main()
|
||||
{
|
||||
int x;
|
||||
io::printn($defined($nameof("hello")));
|
||||
io::printn($defined($nameof(x)));
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user