Files
c3c/test/test_suite/macro_methods/macro_methods_defined_twice.c3
2021-07-21 19:28:02 +02:00

32 lines
395 B
Plaintext

module foo;
struct Bar
{
int x;
}
module baz;
import foo;
import std::io;
macro void foo::Bar.test(Bar *bar)
{
io::println("Inside of baz::Bar.test");
}
macro void Bar.test(Bar *bar) // #error: This macro method is already defined in this module
{
io::println("Inside of baz::Bar.test");
}
module abc;
import foo;
import baz;
func void main()
{
Bar bar;
bar.test();
}