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

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

Issue 978633003: Don't define parameters when visiting a function-typed formal parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months 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 475c5b09df4550e1dedfc45f3b02fbcf5b5f5a07..fb22d618878d10acde34b4840ee13a9bdbc106dc 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -12189,8 +12189,11 @@ abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
Object visitFormalParameterList(FormalParameterList node) {
super.visitFormalParameterList(node);
// We finished resolving function signature, now include formal parameters
- // scope.
- if (_nameScope is FunctionScope) {
+ // scope. Note: we must not do this if the parent is a
+ // FunctionTypedFormalParameter, because in that case we aren't finished
+ // resolving the full function signature, just a part of it.
+ if (_nameScope is FunctionScope &&
+ node.parent is! FunctionTypedFormalParameter) {
(_nameScope as FunctionScope).defineParameters();
}
if (_nameScope is FunctionTypeScope) {
« 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