| Index: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
|
| index fccf1bff5dd05c409fdc765f129c7d63055dc9c1..c2234a4dc64fb57220a86198da320826ab9d5af0 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
|
| @@ -995,6 +995,9 @@ class TypedefElementX extends ElementX implements TypedefElement {
|
| */
|
| DartType alias;
|
|
|
| + /// [:true:] if the typedef has been checked for cyclic reference.
|
| + bool hasBeenCheckedForCycles = false;
|
| +
|
| bool get isResolved => mapping != null;
|
|
|
| // TODO(johnniwinther): Store the mapping in the resolution enqueuer instead.
|
| @@ -1038,6 +1041,13 @@ class TypedefElementX extends ElementX implements TypedefElement {
|
| Scope buildScope() {
|
| return new TypeDeclarationScope(enclosingElement.buildScope(), this);
|
| }
|
| +
|
| + void checkCyclicReference(Compiler compiler) {
|
| + if (hasBeenCheckedForCycles) return;
|
| + var visitor = new TypedefCyclicVisitor(compiler, this);
|
| + computeType(compiler).accept(visitor, null);
|
| + hasBeenCheckedForCycles = true;
|
| + }
|
| }
|
|
|
| class VariableElementX extends ElementX implements VariableElement {
|
|
|