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..ee640dc30680e342dc2d38c9aedacd3bc0162f9c 100644 |
| --- a/lib/compiler/implementation/compiler.dart |
| +++ b/lib/compiler/implementation/compiler.dart |
| @@ -556,8 +556,12 @@ 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. An accessor always have an abstract field, |
|
floitsch
2012/08/01 09:05:01
has
Anders Johnsen
2012/08/01 09:15:38
Done.
|
| + // representing the accessor in the lookup scope. We can then always |
|
floitsch
2012/08/01 09:05:01
We can thus skip the accessor and just handle the
Anders Johnsen
2012/08/01 09:15:38
Done.
|
| + // skip accessors and just handle the abstract field. |
| + } 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", |