Skip to content

Dart 1.23 (strong mode) can not infer the type well #29437

Closed
@tomyeh

Description

@tomyeh

With the following code:

const dur = const Duration(seconds: 10);
final val = dur.inSeconds;

Dart 1.23 (dartanalyzer) said "hint • The type of 'val' can't be inferred because of the use of the instance getter 'inSeconds'"

Note: there is no such issue in Dart 1.22.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions