| Index: sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
|
| index da404e018782d889557f87d9c9354abc19d99cdc..a40fb89fe28cdd71aadb20dd30b7bfe15152ac66 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
|
| @@ -132,6 +132,12 @@ class SsaTypeGuardInserter extends SsaNonSpeculativeTypePropagator
|
| if (speculatedType.element == backend.jsNumberClass) {
|
| speculatedType = compiler.numClass.computeType(compiler);
|
| }
|
| + // Use the JSString type instead of String because String is
|
| + // not assignment compatible with JSIndexable, but we still
|
| + // want to generate a type guard.
|
| + if (sourceType.element == compiler.stringClass) {
|
| + sourceType = backend.jsStringClass.computeType(compiler);
|
| + }
|
| if (!compiler.types.isAssignable(speculatedType, sourceType)) {
|
| return false;
|
| }
|
|
|