Skip to content

analyzer: missing type propagation of method calls on top-level final fields #17800

Closed
@jmesserly

Description

@jmesserly

I have code like:

void main(List arguments) {
  var args = _argParser.parse(arguments);
  // ... more code ...
}

final _argParser = new ArgParser()
    // <snip>
    ..addFlag('help', help: 'prints this message');

When hovering over the bottom _argParser, it displays the propagated type as "ArgParser". However, when hovering over the use in main, it doesn't show an inferred type, and the ".parse" doesn't let me "go to declaration" or show a method tooltip. It also means that "var args" doesn't get a propagated type either.

Dart Editor version 1.3.0.dev_06_01 (DEV)
Dart SDK version 1.3.0-dev.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions