A simple way of ensuring this would be to filter out var bindings to "thread" objects in the env of e2 in finish{ async{e1} async{e2} };e and then infer the type of the e2 to see if still type-checks.
Could also check that free-vars of e2 don't contain thread vars.
A simple way of ensuring this would be to filter out var bindings to "thread" objects in the env of
e2
infinish{ async{e1} async{e2} };e
and then infer the type of thee2
to see if still type-checks.Could also check that free-vars of
e2
don't contain thread vars.