Skip to content

Explaination of subtyping #517

Answered by rossberg
q82419 asked this question in Q&A
Feb 7, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You probably missed that function subtyping is contravariant in the parameters, i.e., the subtyping rule switches direction for the parameter types (in Wasm's rule, the premise t21* ≤ t11*). Thus, $s' needs to match $s, not the other way round. (Edit: fixed typo)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@q82419
Comment options

Answer selected by q82419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants