[VM] Fix type finalization for Kernel function types.
Change-Id: I45d1f9686ba52526af17bb9b720eb09f91f91876 Reviewed-on: https://dart-review.googlesource.com/44803 Reviewed-by: Samir Jindel <sjindel@google.com> Commit-Queue: Régis Crelier <regis@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
4ff939d3e4
commit
c89055ee32
@@ -639,7 +639,13 @@ void ClassFinalizer::CheckRecursiveType(const Class& cls,
|
||||
const TypeArguments& arguments =
|
||||
TypeArguments::Handle(zone, type.arguments());
|
||||
// A type can only be recursive via its type arguments.
|
||||
ASSERT(!arguments.IsNull());
|
||||
if (arguments.IsNull()) {
|
||||
// However, Kernel does not keep the relation between a function type and
|
||||
// its declaring typedef. Therefore, a typedef-declared function type may
|
||||
// refer to the still unfinalized typedef via a type in its signature.
|
||||
ASSERT(type.IsFunctionType());
|
||||
return;
|
||||
}
|
||||
const intptr_t num_type_args = arguments.Length();
|
||||
ASSERT(num_type_args > 0);
|
||||
ASSERT(num_type_args == type_cls.NumTypeArguments());
|
||||
@@ -1100,7 +1106,7 @@ void ClassFinalizer::CheckTypeArgumentBounds(const Class& cls,
|
||||
}
|
||||
}
|
||||
AbstractType& super_type = AbstractType::Handle(cls.super_type());
|
||||
if (!super_type.IsNull()) {
|
||||
if (!super_type.IsNull() && !super_type.IsBeingFinalized()) {
|
||||
const Class& super_class = Class::Handle(super_type.type_class());
|
||||
CheckTypeArgumentBounds(super_class, arguments, bound_error);
|
||||
}
|
||||
|
||||
@@ -493,11 +493,6 @@ mixin_supertype_subclass_test/05: MissingCompileTimeError
|
||||
|
||||
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
|
||||
const_instance_field_test/01: Crash # Issue 32326.
|
||||
cyclic_type_variable_test/01: Crash
|
||||
cyclic_type_variable_test/02: Crash
|
||||
cyclic_type_variable_test/03: Crash
|
||||
cyclic_type_variable_test/04: Crash
|
||||
cyclic_type_variable_test/none: Crash
|
||||
deopt_inlined_function_lazy_test: Skip
|
||||
tearoff_dynamic_test: Crash
|
||||
|
||||
@@ -772,11 +767,6 @@ least_upper_bound_expansive_test/none: RuntimeError # Please triage.
|
||||
|
||||
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
|
||||
const_instance_field_test/01: Crash # Issue 32326.
|
||||
cyclic_type_variable_test/01: Crash
|
||||
cyclic_type_variable_test/02: Crash
|
||||
cyclic_type_variable_test/03: Crash
|
||||
cyclic_type_variable_test/04: Crash
|
||||
cyclic_type_variable_test/none: Crash
|
||||
external_test/13: Crash
|
||||
regress_29025_test: Crash
|
||||
tearoff_dynamic_test: Crash
|
||||
|
||||
Reference in New Issue
Block a user