Dart Analyze logoDart Analyze/
DRT-W1423

Inline function types can't be used for parameters in a generic function typeDRT-W1423

Major severityMajor
Bug Risk categoryBug Risk

The analyzer produces this diagnostic when a generic function type has a function-valued parameter that is written using the older inline function type syntax.

Example

The following code produces this diagnostic because the parameter f, in the generic function type used to define F, uses the inline function type syntax:

typedef F = int Function(int f(String s));

Common fixes

Use the generic function syntax for the parameter's type:

typedef F = int Function(int Function(String));