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

Unified Diff: pkg/compiler/lib/src/common_elements.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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index aa98d034e98a3bd413c54c9f4807010fb7e90df3..78ed5d2f458cd623eeb7bd19af7143c40c76a9fd 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -1348,6 +1348,15 @@ abstract class ElementEnvironment {
/// Returns the type of the [local] function.
FunctionType getLocalFunctionType(Local local);
+ /// Returns the set of type parameters associated with a given class entity.
+ /// For example, for a class Foo, declared like this:
+ ///
+ /// class Foo<A, B>{}
+ ///
+ /// getTypeVariables would return a list containing the [DartType]s
+ /// corresponding to A and B.
+ List<DartType> getTypeVariables(ClassEntity cls);
Johnni Winther 2017/09/04 06:59:56 [getClassTypeVariables] is probably better since m
Emily Fortuna 2017/09/05 17:13:31 Done.
+
/// Gets the constant value of [field], or `null` if [field] is non-const.
ConstantExpression getFieldConstant(FieldEntity field);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698