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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2947703002: Fix ParameterElementImpl.hasImplicitType for function-typed parameters. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_common.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 analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 7431 matching lines...) Expand 10 before | Expand all | Expand 10 after
7442 * Set Dart code of the default value. 7442 * Set Dart code of the default value.
7443 */ 7443 */
7444 void set defaultValueCode(String defaultValueCode) { 7444 void set defaultValueCode(String defaultValueCode) {
7445 _assertNotResynthesized(_unlinkedParam); 7445 _assertNotResynthesized(_unlinkedParam);
7446 this._defaultValueCode = StringUtilities.intern(defaultValueCode); 7446 this._defaultValueCode = StringUtilities.intern(defaultValueCode);
7447 } 7447 }
7448 7448
7449 @override 7449 @override
7450 bool get hasImplicitType { 7450 bool get hasImplicitType {
7451 if (_unlinkedParam != null) { 7451 if (_unlinkedParam != null) {
7452 return _unlinkedParam.type == null; 7452 return _unlinkedParam.type == null && !_unlinkedParam.isFunctionTyped;
7453 } 7453 }
7454 return super.hasImplicitType; 7454 return super.hasImplicitType;
7455 } 7455 }
7456 7456
7457 @override 7457 @override
7458 void set hasImplicitType(bool hasImplicitType) { 7458 void set hasImplicitType(bool hasImplicitType) {
7459 _assertNotResynthesized(_unlinkedParam); 7459 _assertNotResynthesized(_unlinkedParam);
7460 super.hasImplicitType = hasImplicitType; 7460 super.hasImplicitType = hasImplicitType;
7461 } 7461 }
7462 7462
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
9093 9093
9094 @override 9094 @override
9095 void visitElement(Element element) { 9095 void visitElement(Element element) {
9096 int offset = element.nameOffset; 9096 int offset = element.nameOffset;
9097 if (offset != -1) { 9097 if (offset != -1) {
9098 map[offset] = element; 9098 map[offset] = element;
9099 } 9099 }
9100 super.visitElement(element); 9100 super.visitElement(element);
9101 } 9101 }
9102 } 9102 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698