| 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 d060765e05196e70d83e73026d7ba1507e529773..a63e229d19a4faff0481cc521c3b0d410760e30c 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| @@ -1422,13 +1422,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| DartType thenType = analyzeInPromotedContext(condition, thenExpression);
|
|
|
| DartType elseType = analyzeNonVoid(node.elseExpression);
|
| - if (types.isSubtype(thenType, elseType)) {
|
| - return thenType;
|
| - } else if (types.isSubtype(elseType, thenType)) {
|
| - return elseType;
|
| - } else {
|
| - return objectType;
|
| - }
|
| + return compiler.types.computeLeastUpperBound(thenType, elseType);
|
| }
|
|
|
| visitStringInterpolation(StringInterpolation node) {
|
|
|