Skip to content

functions that reference Top-level and static fields are missing dump info #34604

Open
@ghost

Description

@kevmoo commented on Sep 26, 2018, 5:44 PM UTC:

static const List<BenchmarkID> values = const <BenchmarkID> [ ... ];
static BenchmarkID valueOf(int value) => _byValue[value];
static final Map<int, BenchmarkID> _byValue = $pb.ProtobufEnum.initByValue(values);

valueOf looks like this is JS

"function(value) {\n return $.$get$BenchmarkID__byValue().$index(0, value);\n}\n"

Dump info captures that this function references _byValue and the [] operator on Map.

Dump info DOES NOT capture that _byValue references the local static field values.

    lazy($, "BenchmarkID__byValue", "$get$BenchmarkID__byValue", function() {
      return M.ProtobufEnum_initByValue(C.List_SRr, T.BenchmarkID);
    });

This issue was moved by kevmoo from dart-lang/dart2js_info#49.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions