Skip to content

Commit

Permalink
Fix expected type in substByContext
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: Sigmund Cherem <[email protected]>
  • Loading branch information
sigmundch authored and [email protected] committed Apr 10, 2018
1 parent 5e99872 commit f71d204
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/compile_time_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ class AstEvaluationEnvironment extends EvaluationEnvironmentBase {

@override
ResolutionInterfaceType substByContext(
ResolutionInterfaceType base, ResolutionInterfaceType target) {
ResolutionDartType base, ResolutionInterfaceType target) {
return base.substByContext(target);
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/constants/evaluation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class EvaluationEnvironment {
/// Performs the substitution of the type arguments of [target] for their
/// corresponding type variables in [type].
InterfaceType substByContext(
covariant InterfaceType base, covariant InterfaceType target);
covariant DartType base, covariant InterfaceType target);

void reportWarning(
ConstantExpression expression, MessageKind kind, Map arguments);
Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/kernel/element_map_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ class KernelEvaluationEnvironment extends EvaluationEnvironmentBase {
DartTypes get types => _elementMap.types;

@override
InterfaceType substByContext(InterfaceType base, InterfaceType target) {
InterfaceType substByContext(DartType base, InterfaceType target) {
return _elementMap._substByContext(base, target);
}

Expand Down
1 change: 0 additions & 1 deletion tests/language_2/language_2_dart2js.status
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ compile_time_constant_static5_test/23: CompileTimeError
conditional_rewrite_test: RuntimeError
config_import_corelib_test: CompileTimeError
config_import_test: RuntimeError
const_cast3_test: Crash # type 'TypeVariableType' is not a subtype of type 'InterfaceType' of 'base' where
const_dynamic_type_literal_test/02: MissingCompileTimeError
const_evaluation_test/01: RuntimeError
const_instance_field_test/01: MissingCompileTimeError
Expand Down

0 comments on commit f71d204

Please sign in to comment.