Chromium Code Reviews| Index: pkg/compiler/lib/src/elements/modelx.dart |
| diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
| index 275ba80e4cf9d6588921bdf07d792b9bb1f2c92a..3242982b4330b7347c9171439da7e399dc9ac426 100644 |
| --- a/pkg/compiler/lib/src/elements/modelx.dart |
| +++ b/pkg/compiler/lib/src/elements/modelx.dart |
| @@ -1012,9 +1012,10 @@ class LibraryElementX |
| /** Look up a top-level element in this library, but only look for |
| * non-imported elements. Returns null if no such element exist. */ |
| Element findLocal(String elementName) { |
| - // TODO(johnniwinther): How to handle injected elements in the patch |
| - // library? |
| Element result = localScope.lookup(elementName); |
| + if (result == null && isPatched) { |
| + result = patch.localScope.lookup(elementName); |
| + } |
|
Lasse Reichstein Nielsen
2015/08/12 09:46:55
Unrelated change?
floitsch
2015/08/12 13:30:46
No. necessary, because we are looking up an elemen
|
| if (result == null || result.library != this) return null; |
| return result; |
| } |