| 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 62de10d4b444f959f6094345acd169e48e049a4c..9272289b5ecd6ec8924f815cb2d8d0b46ddbd58c 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| @@ -240,8 +240,11 @@ class TypeCheckerVisitor implements Visitor<DartType> {
|
| }
|
|
|
| DartType visitExpressionStatement(ExpressionStatement node) {
|
| - analyze(node.expression);
|
| - return StatementType.NOT_RETURNING;
|
| + Expression expression = node.expression;
|
| + analyze(expression);
|
| + return (expression.asThrow() != null)
|
| + ? StatementType.RETURNING
|
| + : StatementType.NOT_RETURNING;
|
| }
|
|
|
| /** Dart Programming Language Specification: 11.5.1 For Loop */
|
| @@ -630,7 +633,7 @@ class TypeCheckerVisitor implements Visitor<DartType> {
|
|
|
| DartType visitThrow(Throw node) {
|
| analyze(node.expression);
|
| - return StatementType.RETURNING;
|
| + return types.dynamicType;
|
| }
|
|
|
| DartType computeType(Element element) {
|
|
|