by rileymat2 · 10y ago · 0 comments
function int_id(x: int): int { return x; }
If this code is executed with no run time checks then the body will do no work and return x. However if we are forced to perform run time type checks to enforce soundness then the body will look something like.
function int_id(x: int): int { assert(x is int); return x; }