| Index: lib/compiler/implementation/ssa/optimize.dart
|
| diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
|
| index ef7273adb755e001b8be7f22cdfdd358386d5dac..e84c0e907ebf24ccdc52c1f2bb6dbe09596fc028 100644
|
| --- a/lib/compiler/implementation/ssa/optimize.dart
|
| +++ b/lib/compiler/implementation/ssa/optimize.dart
|
| @@ -1209,13 +1209,15 @@ class BaseRecompilationVisitor extends HBaseVisitor {
|
| void visitFieldGet(HFieldGet node) {
|
| if (!node.element.isInstanceMember()) return;
|
| Element field = node.element;
|
| - HType type = backend.optimisticFieldTypeAfterConstruction(field);
|
| - if (!type.isUnknown()) {
|
| - // Allow handling even if we haven't seen any types for this
|
| - // field yet. There might still be only one setter in an
|
| - // initializer list or constructor body and recompilation
|
| - // can therefore pay off.
|
| - handleFieldGet(node, type);
|
| + if (field != null) {
|
| + HType type = backend.optimisticFieldTypeAfterConstruction(field);
|
| + if (!type.isUnknown()) {
|
| + // Allow handling even if we haven't seen any types for this
|
| + // field yet. There might still be only one setter in an
|
| + // initializer list or constructor body and recompilation
|
| + // can therefore pay off.
|
| + handleFieldGet(node, type);
|
| + }
|
| }
|
| }
|
|
|
|
|