Closed bakkot closed 2 months ago
We should add an
assertNoTypeError
test fora normal completion containing an ECMAScript language value
andNormalCompletion(*true*)
or something (the normal completion parameter type being a subtype of the declared type).
Done. Though our type system represents false
as a distinct type from Boolean
, so strictly speaking we already had that.
I guess we could simplify that other test to a normal completion containing *false*
if we wanted.
Based on https://github.com/tc39/ecmarkup/pull/612.
We don't (and are not going to) have generic types, so just hardcode these specific generic types. Also observe that a normal completion of
never
is equivalent tonever
, which allows us to get errors when passingNormalCompletion(x)
toNormalCompletion(not-x)
. The latter doesn't really come up for arguments but it does for returned values, which I want to handle soon.