mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
First 0.7 update, removing all deprecated features.
This commit is contained in:
committed by
Christoffer Lerno
parent
cff6697818
commit
2a895ec7be
@@ -15,7 +15,7 @@ struct An2
|
||||
|
||||
extern fn void printf(char *string);
|
||||
|
||||
macro void An2.@helloWorld(An2* &an2)
|
||||
macro void An2.@helloWorld(&an2)
|
||||
{
|
||||
printf("An2 hello\n");
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ struct Foo
|
||||
int x;
|
||||
}
|
||||
|
||||
macro void Foo.@hello(Foo* &this) { this.x = 3; printf("-%d\n", this.x); }
|
||||
macro void Foo.@hello(&this) { this.x = 3; printf("-%d\n", this.x); }
|
||||
macro void Foo.hello(Foo* this) { this.x = 4; printf("-%d\n", this.x); }
|
||||
macro void Foo.hello2(Foo this) { this.x = 5; printf("-%d\n", this.x); }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ struct An2
|
||||
|
||||
extern fn void printf(char* string);
|
||||
|
||||
macro void An2.@helloWorld(An2* &an2)
|
||||
macro void An2.@helloWorld(&an2)
|
||||
{
|
||||
printf("An2 hello\n");
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ module baz;
|
||||
import foo;
|
||||
import std::io;
|
||||
|
||||
macro void foo::Bar.@test(Bar* &bar)
|
||||
macro void foo::Bar.@test(&bar)
|
||||
{
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module bad;
|
||||
import foo;
|
||||
macro void Bar.@test(Bar* &bar) // #error: This macro method is already defined for 'Bar'.
|
||||
macro void Bar.@test(&bar) // #error: This macro method is already defined for 'Bar'.
|
||||
{
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user