Kernel text printer doesn't properly parenthesize ((...) => expr) as type
#31380
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
front-end-kernel
This arose during a code review: https://dart-review.googlesource.com/c/sdk/+/20907/1/pkg/front_end/testcases/inference/generic_methods_inference_error.dart.strong.expect#7
When an
AsExpression
contains aFunctionExpression
, the text printer prints it as(...) => expr as type
, which makes it look like theFunctionExpression
contains theAsExpression
. The text printer should add parentheses:((...) => expr) as type
.It looks like it should be a pretty simple fix--I'll work on it if time allows. If someone on the kernel team wants to take over this bug from me, please feel free.
The text was updated successfully, but these errors were encountered: