mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Bad error message aliasing an ident with a path. #1481.
This commit is contained in:
2
test/test_suite/define/alias_typename.c3
Normal file
2
test/test_suite/define/alias_typename.c3
Normal file
@@ -0,0 +1,2 @@
|
||||
def ShouldNotBeUppercase = FOO; // #error: A constant may not have a type name
|
||||
def ShouldNotBeUppercase2 = abc; // #error: An identifier may not be aliased
|
||||
@@ -9,7 +9,7 @@ def A_CONST_INT = A_CONST(<int>);
|
||||
def standard_foo(<int>) = ofke; // #error: Expected '='
|
||||
def fn foo = fef; // #error: A type, variable, constant or attribute name was expected here
|
||||
def feokfe = fn void(int); // #error: This looks like you're declaring a function type alias
|
||||
def Helo = helo; // #error: A type name was expected, but this looks a variable
|
||||
def Helo = OFKE; // #error: A type name was expected here
|
||||
def Helo = helo; // #error: An identifier may not be aliased
|
||||
def Helo = OFKE; // #error: A constant may not have a type name alias
|
||||
def int = int; // #error: 'int' is a reserved keyword, try another name
|
||||
def main = foo; // #error: 'main' is reserved and cannot be used as an alias.
|
||||
|
||||
Reference in New Issue
Block a user