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

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

Issue 2642763006: Substitute for type parameters in getReifiedType. (Closed)
Patch Set: Created 3 years, 11 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/dart/element/element_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 analyzer.src.dart.element.member; 5 library analyzer.src.dart.element.member;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 597
598 @override 598 @override
599 /*=T*/ accept/*<T>*/(ElementVisitor<dynamic/*=T*/ > visitor) => 599 /*=T*/ accept/*<T>*/(ElementVisitor<dynamic/*=T*/ > visitor) =>
600 visitor.visitMethodElement(this); 600 visitor.visitMethodElement(this);
601 601
602 @override 602 @override
603 MethodDeclaration computeNode() => baseElement.computeNode(); 603 MethodDeclaration computeNode() => baseElement.computeNode();
604 604
605 @override 605 @override
606 FunctionType getReifiedType(DartType objectType) => 606 FunctionType getReifiedType(DartType objectType) =>
607 baseElement.getReifiedType(objectType); 607 substituteFor(baseElement.getReifiedType(objectType));
608 608
609 @override 609 @override
610 String toString() { 610 String toString() {
611 MethodElement baseElement = this.baseElement; 611 MethodElement baseElement = this.baseElement;
612 List<ParameterElement> parameters = this.parameters; 612 List<ParameterElement> parameters = this.parameters;
613 FunctionType type = this.type; 613 FunctionType type = this.type;
614 StringBuffer buffer = new StringBuffer(); 614 StringBuffer buffer = new StringBuffer();
615 buffer.write(baseElement.enclosingElement.displayName); 615 buffer.write(baseElement.enclosingElement.displayName);
616 buffer.write("."); 616 buffer.write(".");
617 buffer.write(baseElement.displayName); 617 buffer.write(baseElement.displayName);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 DartObject computeConstantValue() => baseElement.computeConstantValue(); 1026 DartObject computeConstantValue() => baseElement.computeConstantValue();
1027 1027
1028 @override 1028 @override
1029 void visitChildren(ElementVisitor visitor) { 1029 void visitChildren(ElementVisitor visitor) {
1030 // TODO(brianwilkerson) We need to finish implementing the accessors used 1030 // TODO(brianwilkerson) We need to finish implementing the accessors used
1031 // below so that we can safely invoke them. 1031 // below so that we can safely invoke them.
1032 super.visitChildren(visitor); 1032 super.visitChildren(visitor);
1033 baseElement.initializer?.accept(visitor); 1033 baseElement.initializer?.accept(visitor);
1034 } 1034 }
1035 } 1035 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698