[CP] Place return type into parameter scope in TypeBuilderComputer #55158
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-merged
Cherry-pick has been merged to the stable or beta branch.
cherry-pick-review
Issue that need cherry pick triage to approve
merge-to-stable
triage-automation
See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.
Commit(s) to merge
9ba8663
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/356760
Issue Description
In the CFE the procedure that performed reading of a function type from a dill file placed the return type of the function type outside of the scope of the structural parameters of that function type, leading to a crash, whenever the incremental compiler was loading a typedef from a dill file, the said typedef contained a generic function type on the right-hand side, and the return type of the function type contained references to the structural parameters of the function type.
What is the fix
The fix moves the lines that restore the return type of the function type to the place after the structural parameter scope is built for the current function type.
Why cherry-pick
The described case of typedefs having a specific shape is believed to be fairly widespread and was encountered in Flutter. The impact of the addressed bug is considered to be severe.
Risk
low
Issue link(s)
flutter/flutter#143689
Extra Info
The fix was landed in https://dart-review.googlesource.com/c/sdk/+/355401 to
main
, and the tests were landed separately in https://dart-review.googlesource.com/c/sdk/+/355142.The text was updated successfully, but these errors were encountered: