| Index: lib/src/checker/rules.dart
|
| diff --git a/lib/src/checker/rules.dart b/lib/src/checker/rules.dart
|
| index f77f77ef4802c6b58956ba16969b48a0ba052551..8e5717af4d36681e3e30e62c5b8277b383b6864c 100644
|
| --- a/lib/src/checker/rules.dart
|
| +++ b/lib/src/checker/rules.dart
|
| @@ -748,7 +748,9 @@ class DownwardsInference {
|
| // the instantiated type of the constructor, then
|
| // the uninstantiated element for the constructor, then
|
| // the uninstantiated type for the constructor
|
| - var baseType = constructorElement.type.element.type;
|
| + var rawConstructorElement =
|
| + constructorElement.type.element as ConstructorElement;
|
| + var baseType = rawConstructorElement.type;
|
| if (baseType == null) return false;
|
| // From the interface type (instantiated), get:
|
| // the uninstantiated element, then
|
| @@ -791,8 +793,8 @@ class DownwardsInference {
|
|
|
| bool _inferFunctionExpression(FunctionExpression e, DartType t, errors) {
|
| if (t is! FunctionType) return false;
|
| - var fType = (t as FunctionType);
|
| - var eType = e.staticType;
|
| + var fType = t as FunctionType;
|
| + var eType = e.staticType as FunctionType;
|
| if (eType is! FunctionType) return false;
|
|
|
| // We have a function literal, so we can treat the arrow type
|
|
|