Index: pkg/kernel/lib/transformations/insert_covariance_checks.dart |
diff --git a/pkg/kernel/lib/transformations/insert_covariance_checks.dart b/pkg/kernel/lib/transformations/insert_covariance_checks.dart |
index 050e6915a5db0519897a31d8b70fed827197ecc7..82f9682773a57ba63905776de387724c8c1a70fd 100644 |
--- a/pkg/kernel/lib/transformations/insert_covariance_checks.dart |
+++ b/pkg/kernel/lib/transformations/insert_covariance_checks.dart |
@@ -53,8 +53,8 @@ DartType substituteBounds(DartType type, Map<TypeParameter, DartType> upper, |
/// Currently, we only deduce that the type arguments are exact when the |
/// receiver is `this`. |
class InsertCovarianceChecks { |
+ final CoreTypes coreTypes; |
ClassHierarchy hierarchy; |
- CoreTypes coreTypes; |
TypeEnvironment types; |
/// Maps unsafe members to their checked entry point, to be used at call sites |
@@ -70,11 +70,10 @@ class InsertCovarianceChecks { |
/// in [unsafeMemberEntryPoint]. |
final Set<Member> membersWithCheckedEntryPoint = new Set<Member>(); |
- InsertCovarianceChecks({this.hierarchy, this.coreTypes}); |
+ InsertCovarianceChecks(this.coreTypes, {this.hierarchy}); |
void transformProgram(Program program) { |
hierarchy ??= new ClassHierarchy(program); |
- coreTypes ??= new CoreTypes(program); |
types = new TypeEnvironment(coreTypes, hierarchy); |
// We transform every class before their subtypes. |
// This ensures that transitive overrides are taken into account. |