Commit e77ee771 authored by Giuseppe Castagna's avatar Giuseppe Castagna
Browse files

final?

parent f3b321be
......@@ -99,9 +99,11 @@ and of course, neither detect that one branch cannot ever be selected in `exampl
For Code 8 the issue is more delicate. Both TypeScript and Flow
type the code without annotations, but of course they cannot reconstruct
our intersection type. When we add the intersection
type inferred by our system as an explicit annotation, then both TypeScript and Flow accept these annotations (with the
caveat that for TypeScript one has also to specify the case for unions
of domains—here the case for `Element`—since TypeScript fails to do it). The point is that one can
type inferred by our system as an explicit annotation, then both TypeScript and Flow accept these annotations (with some
caveats: for TypeScript one has also to specify the case for unions
of domains—here the case for `Element`—since TypeScript fails to do it; for
Flow it cannot handle the cases for empty and non-empty lists separately,
but just the union thereof). The point is that one can
also give to these annotations completely wrong return types, and they
are accepted all the same. For instance, Flow accepts for
`is_empty_node` the type:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment