Complete transition to fn. Introduce global/threadlocal

This commit is contained in:
Christoffer Lerno
2021-11-16 17:19:12 +01:00
committed by Christoffer Lerno
parent e2621617f1
commit b52b42d4da
331 changed files with 1279 additions and 1261 deletions

View File

@@ -12,20 +12,20 @@ struct An2
{
}
extern func void printf(char *string);
extern fn void printf(char *string);
macro void An2.helloWorld(An2 *an2)
{
printf("An2 hello\n");
}
func void check()
fn void check()
{
printf("Checking\n");
}
func void main()
fn void main()
{
An1 an;
an.x.y.@helloWorld();

View File

@@ -12,44 +12,44 @@ struct An2
{
}
extern func void printf(char *string);
extern fn void printf(char *string);
macro void An2.helloWorld(An2 *an2)
{
printf("An2 hello\n");
}
func void check()
fn void check()
{
printf("Checking\n");
}
func void test1()
fn void test1()
{
An1 an;
an.x.y.@helloWorld; // #error: macro name must be followed by '('
}
func void test2()
fn void test2()
{
An2 a;
a.@helloWorld; // #error: A macro name must be followed by '('
}
func void test3()
fn void test3()
{
An2 a;
a.@helloWorld.b; // #error: There is no member or method 'b' on 'void'
}
func void test4()
fn void test4()
{
An1 an;
an.x.@y; // #error: '@' should only be placed in front of macro names
}
func void test5()
fn void test5()
{
An1 an;
an.x.@y(); // #error: '@' should only be placed in front of macro names

View File

@@ -23,7 +23,7 @@ module abc;
import foo;
import baz;
func void main()
fn void main()
{
Bar bar;
bar.test();