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

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

Issue 2965053002: Fix for types of function-typed parameters in reified type of MethodElement. (Closed)
Patch Set: Created 3 years, 5 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 | no next file » | 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 6644 matching lines...) Expand 10 before | Expand all | Expand 10 after
6655 } 6655 }
6656 } 6656 }
6657 6657
6658 if (!hasCovariant) { 6658 if (!hasCovariant) {
6659 return type; 6659 return type;
6660 } 6660 }
6661 6661
6662 List<ParameterElement> covariantParameters = parameters.map((parameter) { 6662 List<ParameterElement> covariantParameters = parameters.map((parameter) {
6663 DartType type = parameter.isCovariant ? objectType : parameter.type; 6663 DartType type = parameter.isCovariant ? objectType : parameter.type;
6664 return new ParameterElementImpl.synthetic( 6664 return new ParameterElementImpl.synthetic(
6665 parameter.name, objectType, parameter.parameterKind); 6665 parameter.name, type, parameter.parameterKind);
6666 }).toList(); 6666 }).toList();
6667 6667
6668 return new FunctionElementImpl.synthetic(covariantParameters, returnType) 6668 return new FunctionElementImpl.synthetic(covariantParameters, returnType)
6669 .type; 6669 .type;
6670 } 6670 }
6671 } 6671 }
6672 6672
6673 /** 6673 /**
6674 * The constants for all of the modifiers defined by the Dart language and for a 6674 * The constants for all of the modifiers defined by the Dart language and for a
6675 * few additional flags that are useful. 6675 * few additional flags that are useful.
(...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
9080 9080
9081 @override 9081 @override
9082 void visitElement(Element element) { 9082 void visitElement(Element element) {
9083 int offset = element.nameOffset; 9083 int offset = element.nameOffset;
9084 if (offset != -1) { 9084 if (offset != -1) {
9085 map[offset] = element; 9085 map[offset] = element;
9086 } 9086 }
9087 super.visitElement(element); 9087 super.visitElement(element);
9088 } 9088 }
9089 } 9089 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698