Skip to content

The compiler should protect against using keywords as identifiers #1996

@mohammadfawaz

Description

@mohammadfawaz

#1946 is one example where the storage keyword was used as a type. Another example is

let mut mut = 0;

which compiles without any errors and that seems wrong. I suggest a general solution (in the parser probably?) that protects against the use of any keywords for Ident.

Metadata

Metadata

Assignees

Labels

P: criticalShould be looked at before anything elsebugSomething isn't workingcompiler: parserEverything to do with the parserteam:compilerCompiler Team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions