20acfbc876
In order to implement "why not promoted" functionality index expressions, we need to call checkIndexExpressionIndex from the resolver, so that we can pass it failed promotion information. So move it into the ErrorDetectionHelpers mixin. Bug: https://github.com/dart-lang/sdk/issues/44898 Change-Id: Idc70e3421142da1d3100c288c912b6483a91b28c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193087 Reviewed-by: Konstantin Shcheglov <scheglov@google.com>