Providing a more accurate message when trying to use a reserved word as a function name #1750
Labels
Accepted
Accepted Request
Enhancement Request
New feature or request
Implemented Needs Verification
Check if this issue is resolved
Milestone
Hi 👋!
When the code is compiled, the compiler says Error: A function name must start with lower case, as names starting with upper case are reserved for types., pointing to
double
function name. But it's not accurate for our situation where we're trying to use a reserved type keyword.Sample code:
saying something like "Cannot use the reserved type 'double' as a function name" instead of the current misleading message about case sensitivity would be more helpful.
In
parse_func_macro_header
, when it sees this token type and a left parenthesis, it assumes it's trying to define a function with an uppercase name (which is reserved for types).The error message could be improved by:
The text was updated successfully, but these errors were encountered: