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

30 lines
380 B
Plaintext

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