Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1535533002: Resolve comment references before function type aliases. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7c3433d5d18ec5f3c2bfe55be18287c8310b3a6e..43b81e984cd71037817c59855ed580c028517f9d 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -8497,9 +8497,11 @@ class ResolverVisitor extends ScopedVisitor {
@override
Object visitComment(Comment node) {
- if (node.parent is FunctionDeclaration ||
- node.parent is ConstructorDeclaration ||
- node.parent is MethodDeclaration) {
+ AstNode parent = node.parent;
+ if (parent is FunctionDeclaration ||
+ parent is FunctionTypeAlias ||
+ parent is ConstructorDeclaration ||
+ parent is MethodDeclaration) {
if (!identical(node, _commentBeforeFunction)) {
_commentBeforeFunction = node;
return null;
@@ -8929,6 +8931,16 @@ class ResolverVisitor extends ScopedVisitor {
}
@override
+ Object visitFormalParameterList(FormalParameterList node) {
+ super.visitFormalParameterList(node);
+ if (_commentBeforeFunction != null) {
+ safelyVisit(_commentBeforeFunction);
+ _commentBeforeFunction = null;
+ }
+ return null;
+ }
+
+ @override
Object visitHideCombinator(HideCombinator node) => null;
@override
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698