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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library engine.resolver; 5 library engine.resolver;
6 6
7 import "dart:math" as math; 7 import "dart:math" as math;
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/generated/utilities_collection.dart'; 10 import 'package:analyzer/src/generated/utilities_collection.dart';
(...skipping 12171 matching lines...) Expand 10 before | Expand all | Expand 10 after
12182 safelyVisit(node.identifier); 12182 safelyVisit(node.identifier);
12183 safelyVisit(node.iterable); 12183 safelyVisit(node.iterable);
12184 safelyVisit(node.loopVariable); 12184 safelyVisit(node.loopVariable);
12185 visitStatementInScope(node.body); 12185 visitStatementInScope(node.body);
12186 } 12186 }
12187 12187
12188 @override 12188 @override
12189 Object visitFormalParameterList(FormalParameterList node) { 12189 Object visitFormalParameterList(FormalParameterList node) {
12190 super.visitFormalParameterList(node); 12190 super.visitFormalParameterList(node);
12191 // We finished resolving function signature, now include formal parameters 12191 // We finished resolving function signature, now include formal parameters
12192 // scope. 12192 // scope. Note: we must not do this if the parent is a
12193 if (_nameScope is FunctionScope) { 12193 // FunctionTypedFormalParameter, because in that case we aren't finished
12194 // resolving the full function signature, just a part of it.
12195 if (_nameScope is FunctionScope &&
12196 node.parent is! FunctionTypedFormalParameter) {
12194 (_nameScope as FunctionScope).defineParameters(); 12197 (_nameScope as FunctionScope).defineParameters();
12195 } 12198 }
12196 if (_nameScope is FunctionTypeScope) { 12199 if (_nameScope is FunctionTypeScope) {
12197 (_nameScope as FunctionTypeScope).defineParameters(); 12200 (_nameScope as FunctionTypeScope).defineParameters();
12198 } 12201 }
12199 return null; 12202 return null;
12200 } 12203 }
12201 12204
12202 @override 12205 @override
12203 Object visitForStatement(ForStatement node) { 12206 Object visitForStatement(ForStatement node) {
(...skipping 3187 matching lines...) Expand 10 before | Expand all | Expand 10 after
15391 * library. 15394 * library.
15392 */ 15395 */
15393 final HashSet<String> members = new HashSet<String>(); 15396 final HashSet<String> members = new HashSet<String>();
15394 15397
15395 /** 15398 /**
15396 * Names of resolved or unresolved class members that are read in the 15399 * Names of resolved or unresolved class members that are read in the
15397 * library. 15400 * library.
15398 */ 15401 */
15399 final HashSet<String> readMembers = new HashSet<String>(); 15402 final HashSet<String> readMembers = new HashSet<String>();
15400 } 15403 }
OLDNEW
« 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