Skip to content

allow pseudo keywords as getters in Dart transformer #3489

@sigmundch

Description

@sigmundch

The transformer currently don't allow property names like operator and other pseudo keywords. I haven't tried this, but the fix might just require changing isValid in property_utils as follows:

-  bool isValid(String name) => !Keyword.keywords.containsKey(name);
+  bool isValid(String name) {
+    var keyword = Keyword.keywords[name];
+    return keyword == null || keyword.isPseudoKeyword;
+  }

/cc @kegluneq

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions