Skip to content

[Wildcard Variables][spec] _ in imports #3799

@kallentu

Description

@kallentu

Do we allow an import statement like import ... as _;? And if so, what does this do? Is this also non-binding?

@dart-lang/language-team

Previous Discussion

Maybe we should make _ non-binding as an import prefix?

It's like a top-level declaration, but it's also only available in the lexical scope. If you want to import a library only for it's extensions, you may want to import it with a prefix, and never need to refer to it, and as _ would work for that.

Originally posted by @lrhn in #3791

Metadata

Metadata

Assignees

Labels

feature-completenessA special or edge case of another feature which isn't supportedwildcard-variablesThe wildcard-variables feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions