Skip to content

Parser/Resolver problem with is on method declaration #61944

@FMorschel

Description

@FMorschel

Repro:

class A {
  bool myMethod(bool value) {
    return value;
  }

  bool isGetter { // This is being parsed as a method with synthetic `()`
    
  }

  void foo() {
    print('');
  }

  int get myGetter {
    return 42;
  }
}

Now at isGetter separate is with a whitespace. See many different diagnostics even above this.

Note that if the return type is void, this doesn't happen.

I'm not sure what else I could do to help here, but please let me know if I can do anything else.

CC @bwilkerson

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions