Skip to content
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 opened this issue Feb 23, 2018 · 2 comments
Closed

Add a compiler workaround for #908 #917

matanlurey opened this issue Feb 23, 2018 · 2 comments

Comments

@matanlurey
Copy link
Contributor

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.

@matanlurey
Copy link
Contributor Author

matanlurey commented Feb 23, 2018

Simplified this a bit, I won't check that it is a specific Provider type.

Negative, will do this!

@matanlurey
Copy link
Contributor Author

Workaround was landed. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant