Skip to content

Make LUB/GLB more useful for generic types #25821

Closed
@jmesserly

Description

@jmesserly

consider:

void main() {
  var l = true ? [] : <int>[];
  l.add(42);
  print(l);
}

This l is inferred as EfficientLength

(see dart-archive/dev_compiler#288)

Edit: and also fix GUB, as @leafpetersen notes in this comment.

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