Skip to content

VM: no compile error when a getter declaration includes parentheses #5890

Closed
@DartBot

Description

@DartBot

This issue was originally filed by rodion...@unipro.ru


Spec says:
classMemberDe nition:
  declaration `;' |
  methodSignature functionBody
;

methodSignature:
  ...
  static? getterSignature |
  ...
;

getterSignature:
  returnType? get identifier
;

but there's no compile-time error when running co19 test Language/07_Classes/2_Getters_A01_t03:

class C {
  get getter() { throw new C(); }
}

main() {
  try {
    var x = new C().getter;
  } on C catch(ok) {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions