Bad error message aliasing an ident with a path. #1481.

This commit is contained in:
Christoffer Lerno
2024-09-25 21:41:34 +02:00
parent da2f958614
commit bf9ae2f0d3
4 changed files with 26 additions and 3 deletions

View 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

View File

@@ -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.