| Index: sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| index f0391fe957d3bb473ba0a5d4741404593ed6bec4..fc444065d00878ae79aeaa92d3ddc7e5044055d3 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| @@ -579,7 +579,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| DartType type;
|
| DartType returnType;
|
| DartType previousType;
|
| - final FunctionElement element = elements[node];
|
| + final FunctionElement element = elements.getFunctionDefinition(node);
|
| assert(invariant(node, element != null,
|
| message: 'FunctionExpression with no element'));
|
| if (Elements.isUnresolved(element)) return const DynamicType();
|
| @@ -1558,6 +1558,12 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| return type;
|
| }
|
|
|
| + DartType visitRedirectingFactoryBody(RedirectingFactoryBody node) {
|
| + // TODO(lrn): Typecheck the body. It must refer to the constructor
|
| + // of a subtype.
|
| + return StatementType.RETURNING;
|
| + }
|
| +
|
| DartType visitRethrow(Rethrow node) {
|
| return StatementType.RETURNING;
|
| }
|
| @@ -1567,11 +1573,6 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| if (identical(node.beginToken.stringValue, 'native')) {
|
| return StatementType.RETURNING;
|
| }
|
| - if (node.isRedirectingFactoryBody) {
|
| - // TODO(lrn): Typecheck the body. It must refer to the constructor
|
| - // of a subtype.
|
| - return StatementType.RETURNING;
|
| - }
|
|
|
| final expression = node.expression;
|
| final isVoidFunction = expectedReturnType.isVoid;
|
|
|