Chromium Code Reviews| Index: lib/compiler/implementation/compiler.dart |
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart |
| index abc40e3844ecb79c6f81597dd1aa5ef21c544333..a9d73b53b26bb5d748839cf2d1b0d87c0efc7162 100644 |
| --- a/lib/compiler/implementation/compiler.dart |
| +++ b/lib/compiler/implementation/compiler.dart |
| @@ -556,8 +556,10 @@ class Compiler implements DiagnosticListener { |
| while (!patches.isEmpty()) { |
| Element patchElement = patches.head; |
| Element originalElement = lookup(patchElement.name); |
| - // Getters and setters are kept inside a synthetic field. |
| - if (patchElement.kind === ElementKind.ABSTRACT_FIELD) { |
| + if (patchElement.isAccessor()) { |
| + // Skip accessors, since we handle them in the abstract field case. |
|
Mads Ager (google)
2012/08/01 08:08:31
Does this mean that there is both an accessor and
Anders Johnsen
2012/08/01 08:35:50
Yep. It's a invariant on the AST. I've updated the
|
| + } else if (patchElement.kind === ElementKind.ABSTRACT_FIELD) { |
| + // Getters and setters are kept inside a synthetic field. |
| if (originalElement !== null && |
| originalElement.kind !== ElementKind.ABSTRACT_FIELD) { |
| internalError("Cannot patch non-getter/setter with getter/setter", |