Open
Description
The following test fails.
test1() {
Object? s = "x";
s as String;
if (s is Null) {} // ignore: unnecessary_type_check
s = null;
s.expectStaticType<Exactly<Null>>(); // COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// 'Exactly<Null>' doesn't conform to the bound 'Exactly<Object?>' of the type parameter 'R'.
}
Null
is a proper subtype of Object?
and the type of interest for s
, so there should be a promotion.