Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f71d204

Browse files
sigmundchcommit-bot@chromium.org
authored andcommitted
Fix expected type in substByContext
Note: the crash in language_2.status was added as a result of https://dart-review.googlesource.com/c/sdk/+/49835. Change-Id: I0dbd69a7cf80c6c432938f9bfd9df60703d5b367 Reviewed-on: https://dart-review.googlesource.com/50361 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
1 parent 5e99872 commit f71d204

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

pkg/compiler/lib/src/compile_time_constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ class AstEvaluationEnvironment extends EvaluationEnvironmentBase {
14701470

14711471
@override
14721472
ResolutionInterfaceType substByContext(
1473-
ResolutionInterfaceType base, ResolutionInterfaceType target) {
1473+
ResolutionDartType base, ResolutionInterfaceType target) {
14741474
return base.substByContext(target);
14751475
}
14761476

pkg/compiler/lib/src/constants/evaluation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class EvaluationEnvironment {
4040
/// Performs the substitution of the type arguments of [target] for their
4141
/// corresponding type variables in [type].
4242
InterfaceType substByContext(
43-
covariant InterfaceType base, covariant InterfaceType target);
43+
covariant DartType base, covariant InterfaceType target);
4444

4545
void reportWarning(
4646
ConstantExpression expression, MessageKind kind, Map arguments);

pkg/compiler/lib/src/kernel/element_map_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ class KernelEvaluationEnvironment extends EvaluationEnvironmentBase {
18171817
DartTypes get types => _elementMap.types;
18181818

18191819
@override
1820-
InterfaceType substByContext(InterfaceType base, InterfaceType target) {
1820+
InterfaceType substByContext(DartType base, InterfaceType target) {
18211821
return _elementMap._substByContext(base, target);
18221822
}
18231823

tests/language_2/language_2_dart2js.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,6 @@ compile_time_constant_static5_test/23: CompileTimeError
11151115
conditional_rewrite_test: RuntimeError
11161116
config_import_corelib_test: CompileTimeError
11171117
config_import_test: RuntimeError
1118-
const_cast3_test: Crash # type 'TypeVariableType' is not a subtype of type 'InterfaceType' of 'base' where
11191118
const_dynamic_type_literal_test/02: MissingCompileTimeError
11201119
const_evaluation_test/01: RuntimeError
11211120
const_instance_field_test/01: MissingCompileTimeError

0 commit comments

Comments
 (0)