mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Generic modules are back, slightly different.
This commit is contained in:
committed by
Christoffer Lerno
parent
97ac957cb7
commit
d9566ef894
@@ -6,16 +6,16 @@ func void test1()
|
||||
|
||||
int b = (Number)(a);
|
||||
|
||||
int c = (Foo)(a); // #error: Unknown type 'Foo'.
|
||||
int c = (Foo)(a); // #error: type 'Foo' could not be found
|
||||
}
|
||||
|
||||
func void test2()
|
||||
{
|
||||
int d = (Number)(bar);; // #error: Identifier 'bar' could not be found.
|
||||
int d = (Number)(bar);; // #error: identifier 'bar' could not be found
|
||||
}
|
||||
|
||||
func void test3()
|
||||
{
|
||||
int e = (Bar)( // #error: Unknown type 'Bar'.
|
||||
faa); // #error: Identifier 'faa' could not be found.
|
||||
int e = (Bar)( // #error: type 'Bar' could not be found
|
||||
faa); // #error: identifier 'faa' could not be found
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
func void test1()
|
||||
{
|
||||
int a = (i ? 1 : 1); // #error: Identifier 'i' could not be found.
|
||||
int a = (i ? 1 : 1); // #error: identifier 'i' could not be found, did you spell it right
|
||||
}
|
||||
|
||||
func void test2()
|
||||
{
|
||||
int a = (1 ? i : 2); // #error: Identifier 'i' could not be found.
|
||||
int a = (1 ? i : 2); // #error: identifier 'i' could not be found, did you spell it right
|
||||
}
|
||||
|
||||
func void test3()
|
||||
{
|
||||
int a = (1 ? 2 : i); // #error: Identifier 'i' could not be found.
|
||||
int a = (1 ? 2 : i); // #error: identifier 'i' could not be found, did you spell it right
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ func void main()
|
||||
@cofefe(x += 1);
|
||||
@cofefe(xx());
|
||||
@cofefe($x += 1); // #error: Cannot modify '$x' inside of a runtime scope.
|
||||
@cofefe(y += 1); // #error: Identifier 'y' could not be found.
|
||||
@cofefe(y += 1); // #error: identifier 'y' could not be found
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ func void test_scope(int i)
|
||||
int a = 0;
|
||||
break;
|
||||
case 2:
|
||||
test_scope(a + 1); // #error: Identifier 'a' could not be found
|
||||
test_scope(a + 1); // #error: identifier 'a' could not be found, did you spell it right
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
enum EnumTestErrorType3 : int
|
||||
{
|
||||
A = FOO // #error: Identifier 'FOO' could not be found
|
||||
A = FOO // #error: constant 'FOO' could not be found, did you spell it
|
||||
}
|
||||
|
||||
func int foo()
|
||||
|
||||
@@ -23,5 +23,5 @@ static func void test2()
|
||||
c = foo::b;
|
||||
c = bar::b;
|
||||
c = foo::a;
|
||||
c = b; // #error: Ambiguous symbol 'b' – both defined in foo and bar, please add the module name to resolve the ambiguity
|
||||
c = b; // #error: global variable 'b' is defined in both 'foo' and 'bar', please use either foo::b or bar::b to resolve the ambiguity
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user