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

Commit 44c9fc0

Browse files
srawlinsalorenzen
authored andcommitted
Add a second type paramter, U, on mapNestedViews; U is the type of the argument of [callback]. Generated template.dart files fill in a type for the argument of [callback], so using dynamic here results in a "uses dynamic as bottom" error.
See discussion here: dart-lang/sdk#29630 PiperOrigin-RevId: 183131552
1 parent fd7c926 commit 44c9fc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

angular/lib/src/core/linker/view_container.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class ViewContainer extends ComponentLoader implements ViewContainerRef {
155155
}
156156
}
157157

158-
List<T> mapNestedViews<T>(List<T> Function(dynamic) callback) {
158+
List<T> mapNestedViews<T, U extends AppView>(List<T> Function(U) callback) {
159159
final nestedViews = this.nestedViews;
160160
if (nestedViews == null || nestedViews.isEmpty) {
161161
return const [];

0 commit comments

Comments
 (0)