mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
33 lines
442 B
Plaintext
33 lines
442 B
Plaintext
// #target: macos-x64
|
|
module playground::bug <Ty>;
|
|
import std::io;
|
|
|
|
struct Foo
|
|
{
|
|
Ty x;
|
|
}
|
|
|
|
fn void Foo.print_it(&self)
|
|
{
|
|
io::printf("Method %s\n", self.x);
|
|
}
|
|
|
|
module playground::bug <Ty>;
|
|
import std::io;
|
|
|
|
macro void print_it(...)
|
|
{
|
|
io::printn("Macro 456");
|
|
}
|
|
|
|
module playground;
|
|
import playground::bug;
|
|
|
|
alias MyFoo = Foo{int};
|
|
|
|
fn void main(String[] args)
|
|
{
|
|
MyFoo foo = { 123 };
|
|
foo.print_it();
|
|
bug::print_it{int}();
|
|
} |