baa6cd6eb9
Introduce ScopeContext.visitEnumDeclaration and visitClassTypeAlias to centralize the standard scoping/visitation order for these declarations, including type-parameter scope, instance scope, and documentation comment handling. Refactor ResolutionVisitor, ScopeResolverVisitor, and ReferenceResolver to use the new helpers, reducing duplicated scope plumbing and keeping the three resolver phases consistent. Fix enum primary-constructor formal parameters being visited outside the body scope, which could resolve annotations and type names against the library scope rather than enum members (for example, when static members shadow outer names). Change-Id: I2ea8335ac6a225a13b5498ffda0a0bcb1ac9b889 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482961 Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>