| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| index e887ec10f9310bf134479b10f54413dad4d3e261..e720a110e5f26a0c419a883c4b7eff0ae265df24 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| @@ -2575,6 +2575,10 @@ class IrBuilder {
|
| }
|
| return addPrimitive(new ir.TypeTest(value, type, typeArguments));
|
| } else {
|
| + if (type.isObject || type.isDynamic) {
|
| + // `x as Object` and `x as dynamic` are the same as `x`.
|
| + return value;
|
| + }
|
| return _continueWithExpression(
|
| (k) => new ir.TypeCast(value, type, typeArguments, k));
|
| }
|
|
|