Skip to content

Dart2js not treating (a.b)() the same as a.b(). #6428

Closed
@lrhn

Description

@lrhn

Example code:

  class C {
    noSuchMethod(m) => m;
  }

  main() {
    var c = new C();
    var r = (c.bar)();
    print(r);
  }
According to the spec, this should do the same as if "c.bar" had not been parenthesized. From the section "Function Expression Invocation": "If e_f is a property access expression, then i is treated as an ordinary method invocation". In this case "(c.bar)" is a property access. (Or is it, Gilad? Are parentheses not just grouping here?)

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions