Open leonsenft opened 5 years ago
Note this issue is being filed preemptively, as support for generics will be added in the upcoming release of package:angular v5.1.0.
package:angular v5.1.0
An incorrect error is shown when binding to a property with a generic-bounded, generic type.
@Component( selector: 'list', template: '', ) class ListComponent<T extends Iterable<E>, E> { @Input() T values; } @Component( selector: 'example', template: '<list [values]="values"></list>', ^^^^^^ directives: [ListComponent], directiveTypes: [Typed<ListComponent<List<int>, int>>()], ) class ExampleComponent { final values = [1, 2]; }
The above code is valid, but the following error is raised:
Attribute value expression (of type List<int>) is not assignable to component input (of type Iterable<R>) [input_binding_type_error]
Note this issue is being filed preemptively, as support for generics will be added in the upcoming release of
package:angular v5.1.0
.Issue
An incorrect error is shown when binding to a property with a generic-bounded, generic type.
Reproduction
The above code is valid, but the following error is raised: