-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Epicarea-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
Description
Consider the following programs:
class Function {}
class C<Function> {}
void main() {}typedef Function = int;
typedef F<Function> = int;
void main() {}extension Function on List {}
extension E<Function> on List<Function> {}
void main() {}mixin Function {}
mixin M<Function> implements List<Function> {}
void main() {}The word Function is a built-in identifier, but it is not consistently reported as an error when this word is used as the name of a type (that is, a class, type parameter, type alias, etc.).
No errors or other diagnostics are emitted except for the following:
- The analyzer hints that a class named
Functionis deprecated. - The analyzer and the CFE emit an error "'Function' can't be used as an identifier because it's a keyword" on
typedef Function = int;.
All declaring occurrences of Function should be marked as a compile-time error.
Metadata
Metadata
Assignees
Labels
Epicarea-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).Cross-cutting, high-level issues (for tracking many other implementation issues, ...).