| Index: lib/type_checker.dart
|
| diff --git a/lib/type_checker.dart b/lib/type_checker.dart
|
| index 0755e6e6f6ee4a03ea1d12e9704fe808b6f6da9e..4ebc31a15403c772a9eecd313a7cba81d915c031 100644
|
| --- a/lib/type_checker.dart
|
| +++ b/lib/type_checker.dart
|
| @@ -319,17 +319,9 @@ class TypeCheckingVisitor
|
| @override
|
| DartType visitConditionalExpression(ConditionalExpression node) {
|
| checkAssignableExpression(node.condition, environment.boolType);
|
| - if (node.staticType == null) {
|
| - var thenType = visitExpression(node.then);
|
| - var otherwiseType = visitExpression(node.otherwise);
|
| - if (thenType is BottomType) return otherwiseType;
|
| - if (otherwiseType is BottomType) return thenType;
|
| - return const DynamicType();
|
| - } else {
|
| - checkAssignableExpression(node.then, node.staticType);
|
| - checkAssignableExpression(node.otherwise, node.staticType);
|
| - return node.staticType;
|
| - }
|
| + checkAssignableExpression(node.then, node.staticType);
|
| + checkAssignableExpression(node.otherwise, node.staticType);
|
| + return node.staticType;
|
| }
|
|
|
| @override
|
|
|