Re-apply workaround for bug fixed by closures containing type promotions in variables with inferred types.
Re-apply workaround for bug fixed by closures containing type promotions in variables with inferred types.

ba5644b76cb811e8f01ffb375b87d20d6295749c fixed an analyzer bug causing
a crash when a top level variable requiring type inference contained a
closure involving type promotion, and removed some explicit types that
were present in the analyzer to work around the bug.

Although the bug has been fixed now, the fix hasn't rolled out in a
release of the SDK.  So to avoid people seeing analysis server crashes
when editing the analyzer, I'm re-introducing the workaround.

Change-Id: I5e61345021cd33cb9ad1f017a7619815a38c6a1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95667
Reviewed-by: Konstantin Shcheglov <09e4d7516628963212bf4aace2f97603d2b706e4@google.com>
Reviewed-by: Brian Wilkerson <1f7641b6b14c52b9163524ab8d9aabff80176f21@google.com>
Commit-Queue: Paul Berry <72d414e3a99fb120308437779d51667bcc0984eb@google.com>

dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk