| Index: pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/resolution_strategy.dart b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| index a7125c7e123e463237c5a3ceec7a57e5e81c1296..f2647fe418ac4a188e5e0d515f8eef7c3ceb75dd 100644
|
| --- a/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| +++ b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| @@ -294,6 +294,7 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
| {bool required: false}) {
|
| cls.ensureResolved(_resolution);
|
| ConstructorElement constructor = cls.implementation.lookupConstructor(name);
|
| + // TODO(johnniwinther): Skip redirecting factories.
|
| if (constructor == null && required) {
|
| throw new SpannableAssertionFailure(
|
| cls,
|
| @@ -316,6 +317,17 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
| }
|
|
|
| @override
|
| + void forEachConstructor(
|
| + ClassElement cls, void f(ConstructorEntity constructor)) {
|
| + cls.ensureResolved(_resolution);
|
| + for (ConstructorElement constructor in cls.implementation.constructors) {
|
| + _resolution.ensureResolved(constructor.declaration);
|
| + if (constructor.isRedirectingFactory) continue;
|
| + f(constructor);
|
| + }
|
| + }
|
| +
|
| + @override
|
| ClassEntity getSuperClass(ClassElement cls,
|
| {bool skipUnnamedMixinApplications: false}) {
|
| cls.ensureResolved(_resolution);
|
| @@ -373,6 +385,17 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
| }
|
|
|
| @override
|
| + void forEachLibraryMember(
|
| + LibraryElement library, void f(MemberEntity member)) {
|
| + library.implementation.forEachLocalMember((Element element) {
|
| + if (!element.isClass && !element.isTypedef) {
|
| + MemberElement member = element;
|
| + f(member);
|
| + }
|
| + });
|
| + }
|
| +
|
| + @override
|
| ClassElement lookupClass(LibraryElement library, String name,
|
| {bool required: false}) {
|
| ClassElement cls = library.implementation.findLocal(name);
|
|
|