Skip to content

dynamic – missing contextual resolution rules #1714

Description

@Nigel-Ecma

The contextual keyword dynamic lacks contextual resolution rules, these need to be defined and added to the Standard.


Explanation

A token being a contextual keyword, means either:

  1. There is a particular context in the grammar where the token is always recognised as a keyword and other places where it is an identifier. An example is the get contextual keyword for property accessors which may otherwise be freely used as an identifier. There are no resolution rules required for get, the meaning comes from its context.
  2. In some contexts a token may have a special meaning dependant upon the environment. An example is the var contextual keyword which may be used in declaration statements, in patterns, etc. In such contexts if there is an accessible type named “var” in the environment the contextual meaning does not apply. The Standard contains resolution rules to determined whether the contextual meaning applies.

dynamic is an example of (2), e.g. it may be used as the name of a type (class, struct, enum, record) as well as a contextual keyword. The Standard is lacking resolution rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions