Chromium Code Reviews| Index: pkg/compiler/lib/src/resolution/members.dart |
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
| index db8ae1c51e056d9d28a0456a2af0df5b96d1ce41..302fbb88329969b1f4c30c8ab161329309c34c90 100644 |
| --- a/pkg/compiler/lib/src/resolution/members.dart |
| +++ b/pkg/compiler/lib/src/resolution/members.dart |
| @@ -3893,6 +3893,19 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
| } |
| if (node.isConst) { |
| analyzeConstantDeferred(node); |
| + |
| + // TODO(johnniwinther): Compute this in the [ConstructorResolver]. |
| + // Check that the constructor is not deferred. |
| + Send send = node.send.selector.asSend(); |
| + if (send != null) { |
| + // Of the form `const a.b(...)`. |
| + if (compiler.deferredLoadTask.deferredPrefixElement( |
| + send, registry.mapping) != null) { |
| + // `a` is a deferred prefix. |
| + isValidAsConstant = false; |
|
sigurdm
2015/09/14 12:36:43
Explain why this is ok
Johnni Winther
2015/09/14 13:51:56
Done.
|
| + } |
| + } |
| + |
| if (isValidAsConstant && |
| constructor.isConst && |
| argumentsResult.isValidAsConstant) { |