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

Side by Side Diff: pkg/compiler/lib/src/resolution/resolution_strategy.dart

Issue 3010943002: Add ability to look up type parameters that are associated with ClassEntities with the element envi… (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 dart2js.resolution_strategy; 5 library dart2js.resolution_strategy;
6 6
7 import 'package:front_end/src/fasta/scanner.dart' show Token; 7 import 'package:front_end/src/fasta/scanner.dart' show Token;
8 8
9 import '../../compiler_new.dart' as api; 9 import '../../compiler_new.dart' as api;
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 return type; 677 return type;
678 } 678 }
679 679
680 @override 680 @override
681 DartType getFieldType(covariant FieldElement field) { 681 DartType getFieldType(covariant FieldElement field) {
682 field.computeType(_resolution); 682 field.computeType(_resolution);
683 return field.type; 683 return field.type;
684 } 684 }
685 685
686 @override 686 @override
687 List<DartType> getTypeVariables(covariant ClassElement cls) {
688 return cls.typeVariables;
689 }
690
691 @override
687 ResolutionFunctionType getLocalFunctionType( 692 ResolutionFunctionType getLocalFunctionType(
688 covariant LocalFunctionElement function) { 693 covariant LocalFunctionElement function) {
689 return function.type; 694 return function.type;
690 } 695 }
691 696
692 @override 697 @override
693 ConstantExpression getFieldConstant(covariant FieldElement field) { 698 ConstantExpression getFieldConstant(covariant FieldElement field) {
694 return field.constant; 699 return field.constant;
695 } 700 }
696 701
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 978
974 @override 979 @override
975 void forEachConstructor( 980 void forEachConstructor(
976 covariant ClassElement cls, void f(ConstructorEntity constructor)) { 981 covariant ClassElement cls, void f(ConstructorEntity constructor)) {
977 cls.constructors.forEach((Element _constructor) { 982 cls.constructors.forEach((Element _constructor) {
978 ConstructorElement constructor = _constructor; 983 ConstructorElement constructor = _constructor;
979 f(constructor); 984 f(constructor);
980 }); 985 });
981 } 986 }
982 } 987 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698