Skip to content

Static access shorthand parsing question #4218

@sgrekhov

Description

@sgrekhov

With the Static access shorthand feature how should the following be parsed?

enum E {
  e1, e2;
  static E? one = null;
}

main() {
  var l1 = <E>[
    ....values // Error?
  ];
  var l2 = <E>[
    ... .values // ... E.values?
  ];
  var l3 = <E>[
    ...?.values // Error?
  ];
  var l4 = <E>[
    ...? .values // ...? E.values?
  ];

  var l5 = <E>[
    ?.one // Null-aware element `?E.one`?
  ];

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThere is a mistake in the language specification or in an active document

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions