dart2js: Combination of generic function invocation and Function types not implemented #31572
Labels
front-end-kernel
legacy-area-front-end
Legacy: Use area-dart-model instead.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
With dart2js (from e299963, 2.0.0-dev.7.0, and probably all versions this year), the following program claims a syntax error:
This syntax is allowed (the actual argument to
print
is an invocation of a generic function where the actual type argument is aFunction
type). Here's the report:The problem also exists when invoked as
dart2js --use-kernel ..
.One known part of the problem is that
isValidMethodTypeArguments
in 'parser.dart' hasn't been updated to take the new styleFunction
types into account, and in particulartryParseType
expects only the syntax we had before those types were added. Other parts of the parser may also be unprepared for this kind of syntax onceisValidMethodTypeArguments
is updated such that an attempt will be made to parse a generic function invocation.The text was updated successfully, but these errors were encountered: