Skip to content

Using unresolved identifier in static context is not compile-time error anymore #6838

Closed
@scheglov

Description

@scheglov

language/import_combinators_negative_test
language/unresolved_top_level_var_negative_test

From Gilad:

At this point this is a static warning and a runtime error. It looks like the spec omits to describe the static warning. I will fix this by adding:

It is as static warning if an identifier expression of the form id occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer and there is no declaration d with name id in the lexical scope enclosing the expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).closed-staleClosed as the issue or PR is assumed staletype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions