mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
17 lines
313 B
C
17 lines
313 B
C
module foo<Type>;
|
|
import std::io;
|
|
|
|
macro @hello(Type thing) {
|
|
io::printfln("%d", $sizeof(thing));
|
|
}
|
|
|
|
module bar;
|
|
|
|
import private foo;
|
|
|
|
define intHello = foo::@hello<int>; // #error: cannot be aliased
|
|
define @intHello = foo::hello<int>; // #error: cannot use
|
|
|
|
fn void main(char[][] args) {
|
|
@intHello(42);
|
|
} |