Skip to content

Build-in identifiers are permitted as prefix. #25733

@ngolovleva

Description

@ngolovleva

According to Dart Language specification (4th edition, Dec 2015) "16.33 Identifier Reference":

"It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias."

However, dart compiles successfully test below.

library lib;
var x = 1;
import "lib.dart" as abstract;
main() {
  abstract.x;
}

The same is true for other build-in identifiers: as, deferred, dynamic, export, external, factory, get, implements, import, library, operator, part, set, static, typedef.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions