This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
passing generic function literals #426
Closed
Description
I have the following
typedef BuiltListProperty<T> BuiltListPropertyFactory<T>(
Stream<ListMutation<T>> mutations);
BuiltListProperty<Object /*=T*/ > _defaultBuiltListPropertyFactory /*<T>*/ (
Stream<ListMutation /*<T>*/ > mutations) =>
new BuiltListProperty<Object /*=T*/ >(mutations);
class BuiltListProperty<E> {
BuiltListProperty /*<R>*/ map /*<R>*/ (/*=R*/ f(E element),
[BuiltListPropertyFactory /*<R>*/ builtListFactory =
_defaultBuiltListPropertyFactory /*<R>*/]) => ...
}
The analyzer complains with
ERROR: Type check failed: _defaultBuiltListPropertyFactory ((Stream<ListMutation>) → BuiltListProperty) is not of type (Stream<ListMutation>) → BuiltListProperty ([frentity] lib/src/list_property/built_list_property.dart:64)
Metadata
Metadata
Assignees
Labels
No labels