/*@ negate :: /\ (number)  => {number  | true}  
              /\ (boolean) => {boolean | true}
 */

function negate(x) {
  if (typeof(x) == "number") {
    return 5;
    // return 0 - x;
  } else {
    return !x;
  }
}

/*@ main :: () => void */
function main(){
  var a = negate(10);
  var b = negate(true);
  return;
}

@@ -11,22 +11,32 @@
  :: /%5C (
+%7B
 number
+ %7C v %3E 0%7D
 )  =%3E %7Bn
@@ -44,20 +44,22 @@
 mber  %7C 
-true
+v %3C 0 
 %7D  %0A    
@@ -72,16 +72,18 @@
     /%5C (
+x:
 boolean)
@@ -167,25 +167,8 @@
 %0A   
- return 5;%0A    //
  ret

add dead cast for non-matching intersection