Aug 13, 2022Kuina-chan


This is the language specification 13 of Kuin Programming Language, and is about compilation errors.

1Kuin Compilation Errors

Kuin compilation errors are represented by hexadecimal error codes.
f the error code is between 0x00010000 and 0x0001FFFF, it was generated by lexical parsing; if it is between 0x00020000 and 0x0002FFFF, it was generated by semantic parsing; and if it is between 0x00000000 and 0x0000FFFF, it was generated elsewhere.
The list of compilation errors that occur in Kuin is shown in Table 1-1.
Table 1-1: Kuin Compilation Errors
Error Code Message
0x00000001 The option 'Option' was used incorrectly.
0x00000002 Unexpected option: 'Option.
0x00000003 The extension of the input file 'File Path' must be '.kn'.
0x00000004 The source file name 'File Path' contains characters that cannot be used.
0x00000005 Cannot open file 'File Path'.
0x00000006 Cannot save file 'File Path'.
0x00000007 The system file 'File Path' is broken.
0x00000008 The icon file 'File Path' is broken.
0x00000009 The number of resource files 'Number Of Resource Files' is too large. Must be 65535 or less.
0x0000000A Only ASCII characters can be used in the file path 'File Path' to be archived.
0x00010001 The same identifier 'Identifier' already exists in the same scope.
0x00010002 The same identifier 'Identifier' already exists in the upper scope.
0x00010003 There is no '}' corresponding to '{' for comment.
0x00010004 Tab characters cannot be written in character literals and string literals. Use the escape sequence '\t' instead.
0x00010005 Line breaks are not allowed in character literals and string literals. Use the escape sequence '\n' instead.
0x00010006 The character 'Character' that cannot be used in identifiers was written.
0x00010007 Incorrect '@' was written in an identifier.
0x00010008 A source file name description 'Source File Name' contains uppercase letters.
0x00010009 Incorrect '\' was written in an identifier.
0x0001000A The identifier 'Identifier...' is too long. Must be 128 characters or less.
0x0001000B An incorrect block or sentence 'Identifier' was written.
0x0001000C The character 'Character' that cannot be used in function attributes was written.
0x0001000D The function attribute 'Function Attribute...' is too long. Must be 128 characters or less.
0x0001000E An invalid character 'Character' was written in a place where the character 'Character' should be written.
0x0001000F There is no 'Block Name' corresponding to 'end Block Name'
0x00010010 Overridden non-function member 'Member Name'.
0x00010011 The member 'Member Name' other than functions and variables has been released.
0x00010012 Block Name' was closed with invalid 'end Block Name' instead of 'end Block Name'.
0x00010013 Incorrectly formatted member 'Member Name' was written.
0x00010014 An invalid '&' was written in other than an argument.
0x00010015 The initializer '::' cannot be written in arguments.
0x00010016 The initializer '::' cannot be written in members.
0x00010017 The initializer '::' must be written in const statements.
0x00010018 There is no 'end' corresponding to a block.
0x00010019 'end Name' is incorrectly formatted.
0x0001001A Closed with invalid 'end Name' that does not correspond to the block.
0x0001001B In an 'if' block, an invalid 'elif' or 'else' clauses is written after an 'else' clause."
0x0001001C In a 'switch' block, an invalid 'case' or 'default' clauses is written after a 'default' clause.
0x0001001D In a 'try' block, an invalid 'catch' or 'finally' clauses is written after a 'finally' clause.
0x0001001E A invalid 'Clause Name' clause was written outside 'Block Name' blocks.
0x0001001F In a 'switch' block, clauses other than 'case', 'default' and 'end switch' were written.
0x00010020 An invalid 'Word' was written where 'Word' should be written.
0x00010021 An incorrect operator 'Operator' was written.
0x00010022 A invalid escape sequence '\Character' was written.
0x00010023 Character code representations must be '\u' followed by a 4-digit hexadecimal number in numbers or capital letters.
0x00010024 A character literal or string literal is not closed.
0x00010025 The character literal 'Character Literal...' is too long. A character literal must contain one character.
0x00010026 There is an empty character literal. A character literal must contain one character.
0x00010027 The ')' corresponding to the parenthesis '(' does not exist where it should be.
0x00010028 An invalid 'Numeric Literal' was written in a numeric literal.
0x00010029 The numeric literal 'Numeric Literal...' is too long. Must be 1024 characters or less.
0x0001002A Hexadecimal literals must start with '0x'.
0x0001002B Exponential notation literals must start with 'e+' or 'e-' and write the exponent part.
0x0001002C The floating point literal 'Floating-point Literal' could not be interpreted. The value may be too large.
0x0001002D The suffix of bit type literal 'Bit-type Literal' must be either 'b8', 'b16', 'b32' or 'b64'.
0x0001002E The integer literal 'Integer Literal' has overflowed.
0x0001002F The parent file of the subsource file 'File Name' was not found.
0x00010030 An 'include' cannot be used for the file 'File Name' in a subsource file.
0x00020001 'main' function does not exist. Define 'func main()' in the source files to be compiled.
0x00020002 The definition of the 'main' function must be 'func main()'.
0x00020003 The member or variable 'Identifier' was accessed directly without 'me', or accessed beyond the function.
0x00020004 For 'File Name@', when referring to global elements in its own source file, the source name before the '@' must be omitted.
0x00020005 A non-public element 'Identifier' in another souce file was referenced. The element must start with a '+'.
0x00020006 The definition of identifier 'Identifier' was not be found. The name may have been written incorrectly.
0x00020007 The definition of 'alias Identifier' is circulating.
0x00020008 The inheritance of 'class Identifier' is circulating.
0x00020009 The member 'Member Name' of the parent class to override cannot be found.
0x0002000A The member name 'Member Name' is duplicated with that of the parent class. Add '*' when overriding.
0x0002000B Overridden non-function member 'Member Name'.
0x0002000C The access modifier does not match that of the overridden member 'Member Name'.
0x0002000D The types or argument names do not match that of the overridden member 'Member Name'.
0x0002000E The member 'Member Name' that is not allowed to be overridden was overridden.
0x0002000F The value of the element '%Element Name' of enumeration type 'Enum Name' must be an 'int' value that can be made a constant at compile time.
0x00020010 The value of the element '%Element Name' of enumeration type 'Enum Name' exceeds the valid range of 'int' type.
0x00020011 The value 'Value' of the element '%Element Name' of enumeration type 'Enum Name is duplicated with the value of another element.
0x00020012 The element name '%Element Name' that does not exist in the enumeration type was written.
0x00020013 The value of global variable 'Variable Name' must be a constant at compile time.
0x00020014 The value of 'const' statement 'Constant Name' must be a constant at compile time.
0x00020015 The type of the variable 'Variable Name' does not match the value type.
0x00020016 The conditional expression of the 'if' block must be 'bool' type.
0x00020017 The conditional expression of the 'elif' clause must be 'bool' type.
0x00020018 The conditional expression of the 'switch' block must be a comparable type.
0x00020019 The type of the 'case' clause does not match the type of the conditional expression in the 'switch' block.
0x0002001A The conditional expression of the 'while' block must be 'bool' type.
0x0002001B The begin value of the 'for' block must be 'int' type.
0x0002001C The end value of the 'for' block must be 'int' type.
0x0002001D The increase / decrease value of the 'for' block must be 'int' type.
0x0002001E The increase / decrease value of the 'for' block must be a constant at compile time.
0x0002001F The increase / decrease value of the 'for' block must be other than '0'.
0x00020020 The condition value in the 'catch' clause must be an 'int' value that can be a constant at compile time.
0x00020021 The exception code for the 'throw' statement must be 'int'.
0x00020022 For functions that return a value, 'ret' statements must return a value.
0x00020023 The type of the 'ret' statement does not match the return type of the function.
0x00020024 The last operation in 'do' statements must be with side effects such as '::' operator or function calls.
0x00020025 'Statement Name' statements must be given block names.
0x00020026 The conditional expression of the 'assert' statement must be 'bool' type.
0x00020027 A non-type was written where a type should be written.
0x00020028 No value was passed where some value should be set.
0x00020029 Incorrect type for operator.
0x0002002A The left value of the assignment operator is not an assignable variable.
0x0002002B 'null' cannot be compared by value.
0x0002002C The type could not be inferred from the element name 'Element Name' of 'enum'.
0x0002002D 'null' cannot be concatenated with the '~' operator.
0x0002002E Divided by 0.
0x0002002F The conditional expression for the '?(,)' operator must be 'bool'.
0x00020030 The two values in the parenthesis for the '?(,)' operator must be the same type.
0x00020031 The '#' operator can only be used for reference types such as classes, 'list' and 'dict'.
0x00020032 The number of array elements written in the '#' operator must be 'int'.
0x00020033 A non-function was called as if it were a function.
0x00020034 Number arguments were written in the function call that received Number arguments. The function type is 'Type'.
0x00020035 A value that cannot be referenced was passed to the Numberth/st/nd/rd argument, which is a reference argument, of the function call.
0x00020036 The type of arguments of the function call is different. 'Type' has been passed where 'Type' should be written in the Numberth/st/nd/rd argument.
0x00020037 A non-array was accessed as an array.
0x00020038 Array indices must be 'int'.
0x00020039 The referenced member 'Member Name' does not exist.
0x0002003A An unpublished member 'Member Name' was referenced.
0x0002003B The element types of the array initializer '[]' do not match.
0x0002003C 'null' was written in the value type array initializer '[]'.
0x0002003D The type could not be determined because all elements of the array initializer '[]' are element names of 'enum'. Cast one of the element names to indicate the type.
0x0002003E The type could not be determined because all elements of the array initializer '[]' are 'null'. Cast one of 'null' to indicate the type.
0x0002003F Accessed inaccessible element 'Identifier'.
0x00020040 The expression of the 'excode' statement must be a constant of '[]char' type.
0x00020041 The key of 'dict' must be a comparable type.
0x00020042 The class 'Class Name' cannot instantiate directly.
1660384346enf