This repository was archived by the owner on Sep 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
DDC+-dev.3.0: '_Future' is not a subtype of ... #913
Comments
Oops, turns out we do type this correctly: ... or mostly, so there is something else going on. |
OK, looks easier than expected to fix. Looks like something related with type inference in DDC. I'll file a bug. |
Nope, we just had a return type of |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
'_Future' is not a subtype of type 'Future<ComponentRef<TestWithNullComponent>>'
This is blocking DDC-dev.30, and Dart2.
Code:
https://github.com/dart-lang/angular/blob/f55fea736cb25040be640e75541acfbcd34e0329/angular/lib/src/core/linker/component_factory.dart#L62-L93
Notably, we can't just
unsafeCast
ComponentRef<dynamic>
:https://github.com/dart-lang/angular/blob/f55fea736cb25040be640e75541acfbcd34e0329/angular/lib/src/core/linker/component_factory.dart#L88-L91
... because it is an an
AppView<dynamic>
, not anAppView<T>
.This violates our contract. We have a couple of options:
ComponentRef<dynamic>
: We lose auto-complete/type-safety..cast<E>
method toComponentRef
and use it = extra work per load._View{Name}Host
to return<T>
not<dynamic>
.The last one is the "right" thing to do, but likely not easy.
The text was updated successfully, but these errors were encountered: