Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Add a compiler workaround for #908 #917

Closed
@matanlurey

Description

@matanlurey

Until #908 is fixed by dart-lang/sdk#32290, we will need to a little bit of our own type inference. I think we can do it safely in the following cases:

  • The Provider type is either:
    • ClassProvider
    • ExistingProvider
    • FactoryProvider
    • ValueProvider
  • The value of <provider>.token is an OpaqueToken<T> where T != dynamic

... we can "force" the OpaqueToken<T>'s T to be applied to Provider<T> for compilation, even though the analyzer thinks that T of Provider<T> is dynamic due to the SDK bug above.

That should be enough to unblock #908, and not cause any regressions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions