Skip to content

Support for extension types in strict modes #53982

Closed
Listed in
@srawlins

Description

@srawlins

There may not be much to do here, but here are some examples:

  • This should be reported for strict-raw-types:

    extension type ET(List it) {}
  • This should be reported for strict-inference:

    extension type ET<T>(int it) {}
    
    var x = ET(it); // could not infer T!
  • This for strict-casts:

    extension type ET(int it) {}
    
    dynamic d = "hello";
    var x = ET(d); // cast from dynamic!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ondevexp-warningIssues with the analyzer's Warning codesfeature-extension-typesImplementation of the extension type featurelegacy-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

      Participants

      @srawlins

      Issue actions

        Support for extension types in strict modes · Issue #53982 · dart-lang/sdk