| Index: pkg/analyzer/lib/src/generated/error_verifier.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| index efd0f9365e26ac40b9008164b1c7000bef503189..28d02ec10a1ef67e12193db4bc039cffb3dc0b16 100644
|
| --- a/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| @@ -5694,6 +5694,15 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
|
| iterableType = iterableType.resolveToBound(_typeProvider.objectType);
|
| DartType bestIterableType =
|
| _typeSystem.mostSpecificTypeArgument(iterableType, loopType);
|
| +
|
| + // Allow it to be a supertype of Iterable<T> (basically just Object) and do
|
| + // an implicit downcast to Iterable<dynamic>.
|
| + if (bestIterableType == null) {
|
| + if (_typeSystem.isSubtypeOf(loopType, iterableType)) {
|
| + bestIterableType = DynamicTypeImpl.instance;
|
| + }
|
| + }
|
| +
|
| if (bestIterableType == null) {
|
| _errorReporter.reportTypeErrorForNode(
|
| StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
|
|
|