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

bla

parent 0e052131
......@@ -90,11 +90,11 @@ function example10( x ) {
/* these version of f and g do not work even if they should check */
var f1 : (number => number) & (any => boolean) = x => {
var f1 : (number => number) & (any => boolean | void ) = x => {
if (typeof(x) === "number"){ throw "false" } else { return true }
}
var g1 : (number => number) & (any => boolean) = x => {
var g1 : (number => number) & (any => boolean | void) = x => {
if (typeof(x) === "number"){ throw "false" } else { return true }
}
......@@ -114,7 +114,7 @@ even though not a single return type is correct. Likewise TypeScript accepts the
function is_empty_node (x : Document) : true;
function is_empty_node (x : { nodeType : 2; childNodes : Nil }) : false;
function is_empty_node (x : { nodeType : 2; childNodes : { nodeType : Node; next : NodeList } }) : 42;
function is_empty_node (x : Element) : boolean;
function is_empty_node (x : Element) : boolean; // covers the union of the two previous cases
function is_empty_node (x : Text) : number;
function is_empty_node (x : Node) : boolean | number
```
......
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