mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Share method extensions across modules by default. Fix bug in string split.
This commit is contained in:
committed by
Christoffer Lerno
parent
dcf0b4c580
commit
abf0f64ac0
@@ -14,14 +14,15 @@ 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
|
||||
module bad;
|
||||
import foo;
|
||||
macro void Bar.@test(Bar &bar) // #error: This macro method is already defined for 'Bar'.
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module abc;
|
||||
import foo;
|
||||
import baz;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ fn void foo::Bar.test(Bar *bar)
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
fn void Bar.test(Bar *bar) // #error: This method is already defined in this module
|
||||
fn void Bar.test(Bar *bar) // #error: This method is already defined for
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
@@ -14,14 +14,15 @@ 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
|
||||
module bad;
|
||||
import foo;
|
||||
macro void Bar.@test(Bar &bar) // #error: This macro method is already defined for 'Bar'.
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module abc;
|
||||
import foo;
|
||||
import baz;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ fn void foo::Bar.test(Bar *bar)
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
fn void Bar.test(Bar *bar) // #error: This method is already defined in this module
|
||||
fn void Bar.test(Bar *bar) // #error: This method is already defined for
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user