Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Typedef with untyped args appear to generate spurious downcast messages #10

Closed
@jacob314

Description

@jacob314

Maybe I am confused about where the downcast is coming from but I don't understand why this generates a downcast.

typedef String StringProvider(data);

void main() {
  List<StringProvider> providers = <StringProvider>[(_) => "foo", (_) => "bar"];
  String someString = providers[1]("arg ignored"); // Generates DownCast warning
}

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