{
  "type": "Program",
  "statements": [
    {
      "type": "ClassDeclaration",
      "definition": {
        "id": {
          "type": "Identifier",
          "name": "A",
          "loc": {
            "start": {
              "line": 16,
              "column": 7,
              "program": "union_types_1.ets"
            },
            "end": {
              "line": 16,
              "column": 8,
              "program": "union_types_1.ets"
            }
          }
        },
        "superClass": null,
        "implements": [],
        "body": [
          {
            "type": "ClassProperty",
            "key": {
              "type": "Identifier",
              "name": "num",
              "loc": {
                "start": {
                  "line": 17,
                  "column": 5,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 17,
                  "column": 8,
                  "program": "union_types_1.ets"
                }
              }
            },
            "value": {
              "type": "NumberLiteral",
              "value": 41,
              "loc": {
                "start": {
                  "line": 17,
                  "column": 16,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 17,
                  "column": 18,
                  "program": "union_types_1.ets"
                }
              }
            },
            "accessibility": "public",
            "static": false,
            "readonly": false,
            "declare": false,
            "optional": false,
            "computed": false,
            "typeAnnotation": {
              "type": "ETSPrimitiveType",
              "loc": {
                "start": {
                  "line": 17,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 17,
                  "column": 13,
                  "program": "union_types_1.ets"
                }
              }
            },
            "definite": false,
            "loc": {
              "start": {
                "line": 17,
                "column": 5,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 17,
                "column": 18,
                "program": "union_types_1.ets"
              }
            }
          },
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "constructor",
              "loc": {
                "start": {
                  "line": 16,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 16,
                  "column": 10,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "constructor",
            "static": false,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "constructor",
                  "loc": {
                    "start": {
                      "line": 16,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 16,
                      "column": 10,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [],
                "body": {
                  "type": "BlockStatement",
                  "statements": [],
                  "loc": {
                    "start": {
                      "line": 16,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 16,
                      "column": 10,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 16,
                    "column": 10,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 16,
                    "column": 10,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 16,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 16,
                  "column": 10,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 1,
                "column": 1,
                "program": null
              },
              "end": {
                "line": 1,
                "column": 1,
                "program": null
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 16,
            "column": 9,
            "program": "union_types_1.ets"
          },
          "end": {
            "line": 18,
            "column": 2,
            "program": "union_types_1.ets"
          }
        }
      },
      "loc": {
        "start": {
          "line": 16,
          "column": 1,
          "program": "union_types_1.ets"
        },
        "end": {
          "line": 18,
          "column": 2,
          "program": "union_types_1.ets"
        }
      }
    },
    {
      "type": "ClassDeclaration",
      "definition": {
        "id": {
          "type": "Identifier",
          "name": "B",
          "loc": {
            "start": {
              "line": 20,
              "column": 7,
              "program": "union_types_1.ets"
            },
            "end": {
              "line": 20,
              "column": 8,
              "program": "union_types_1.ets"
            }
          }
        },
        "superClass": null,
        "implements": [],
        "body": [
          {
            "type": "ClassProperty",
            "key": {
              "type": "Identifier",
              "name": "num",
              "loc": {
                "start": {
                  "line": 21,
                  "column": 5,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 21,
                  "column": 8,
                  "program": "union_types_1.ets"
                }
              }
            },
            "value": {
              "type": "NumberLiteral",
              "value": 42,
              "loc": {
                "start": {
                  "line": 21,
                  "column": 16,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 21,
                  "column": 18,
                  "program": "union_types_1.ets"
                }
              }
            },
            "accessibility": "public",
            "static": false,
            "readonly": false,
            "declare": false,
            "optional": false,
            "computed": false,
            "typeAnnotation": {
              "type": "ETSPrimitiveType",
              "loc": {
                "start": {
                  "line": 21,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 21,
                  "column": 13,
                  "program": "union_types_1.ets"
                }
              }
            },
            "definite": false,
            "loc": {
              "start": {
                "line": 21,
                "column": 5,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 21,
                "column": 18,
                "program": "union_types_1.ets"
              }
            }
          },
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "constructor",
              "loc": {
                "start": {
                  "line": 20,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 20,
                  "column": 10,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "constructor",
            "static": false,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "constructor",
                  "loc": {
                    "start": {
                      "line": 20,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 20,
                      "column": 10,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [],
                "body": {
                  "type": "BlockStatement",
                  "statements": [],
                  "loc": {
                    "start": {
                      "line": 20,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 20,
                      "column": 10,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 20,
                    "column": 10,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 20,
                    "column": 10,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 20,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 20,
                  "column": 10,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 1,
                "column": 1,
                "program": null
              },
              "end": {
                "line": 1,
                "column": 1,
                "program": null
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 20,
            "column": 9,
            "program": "union_types_1.ets"
          },
          "end": {
            "line": 22,
            "column": 2,
            "program": "union_types_1.ets"
          }
        }
      },
      "loc": {
        "start": {
          "line": 20,
          "column": 1,
          "program": "union_types_1.ets"
        },
        "end": {
          "line": 22,
          "column": 2,
          "program": "union_types_1.ets"
        }
      }
    },
    {
      "type": "ClassDeclaration",
      "definition": {
        "id": {
          "type": "Identifier",
          "name": "C",
          "loc": {
            "start": {
              "line": 24,
              "column": 7,
              "program": "union_types_1.ets"
            },
            "end": {
              "line": 24,
              "column": 8,
              "program": "union_types_1.ets"
            }
          }
        },
        "superClass": null,
        "implements": [],
        "body": [
          {
            "type": "ClassProperty",
            "key": {
              "type": "Identifier",
              "name": "num",
              "loc": {
                "start": {
                  "line": 25,
                  "column": 5,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 25,
                  "column": 8,
                  "program": "union_types_1.ets"
                }
              }
            },
            "value": {
              "type": "NumberLiteral",
              "value": 43,
              "loc": {
                "start": {
                  "line": 25,
                  "column": 16,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 25,
                  "column": 18,
                  "program": "union_types_1.ets"
                }
              }
            },
            "accessibility": "public",
            "static": false,
            "readonly": false,
            "declare": false,
            "optional": false,
            "computed": false,
            "typeAnnotation": {
              "type": "ETSPrimitiveType",
              "loc": {
                "start": {
                  "line": 25,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 25,
                  "column": 13,
                  "program": "union_types_1.ets"
                }
              }
            },
            "definite": false,
            "loc": {
              "start": {
                "line": 25,
                "column": 5,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 25,
                "column": 18,
                "program": "union_types_1.ets"
              }
            }
          },
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "constructor",
              "loc": {
                "start": {
                  "line": 26,
                  "column": 5,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 26,
                  "column": 16,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "constructor",
            "accessibility": "public",
            "static": false,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "constructor",
                  "loc": {
                    "start": {
                      "line": 26,
                      "column": 5,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 26,
                      "column": 16,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [
                  {
                    "type": "ETSParameterExpression",
                    "name": {
                      "type": "Identifier",
                      "name": "num",
                      "typeAnnotation": {
                        "type": "ETSPrimitiveType",
                        "loc": {
                          "start": {
                            "line": 26,
                            "column": 22,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 26,
                            "column": 25,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 26,
                          "column": 17,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 26,
                          "column": 25,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    "loc": {
                      "start": {
                        "line": 26,
                        "column": 17,
                        "program": "union_types_1.ets"
                      },
                      "end": {
                        "line": 26,
                        "column": 25,
                        "program": "union_types_1.ets"
                      }
                    }
                  }
                ],
                "body": {
                  "type": "BlockStatement",
                  "statements": [
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "AssignmentExpression",
                        "operator": "=",
                        "left": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "ThisExpression",
                            "loc": {
                              "start": {
                                "line": 27,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 27,
                                "column": 13,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "num",
                            "loc": {
                              "start": {
                                "line": 27,
                                "column": 14,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 27,
                                "column": 17,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 27,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 27,
                              "column": 17,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "Identifier",
                          "name": "num",
                          "loc": {
                            "start": {
                              "line": 27,
                              "column": 20,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 27,
                              "column": 23,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 27,
                            "column": 9,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 27,
                            "column": 23,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 27,
                          "column": 9,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 27,
                          "column": 24,
                          "program": "union_types_1.ets"
                        }
                      }
                    }
                  ],
                  "loc": {
                    "start": {
                      "line": 26,
                      "column": 27,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 28,
                      "column": 6,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 26,
                    "column": 16,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 28,
                    "column": 6,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 26,
                  "column": 16,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 28,
                  "column": 6,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 26,
                "column": 5,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 28,
                "column": 6,
                "program": "union_types_1.ets"
              }
            }
          },
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "num_to_return",
              "loc": {
                "start": {
                  "line": 29,
                  "column": 5,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 29,
                  "column": 18,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "method",
            "accessibility": "public",
            "static": false,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "num_to_return",
                  "loc": {
                    "start": {
                      "line": 29,
                      "column": 5,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 29,
                      "column": 18,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [],
                "returnType": {
                  "type": "ETSPrimitiveType",
                  "loc": {
                    "start": {
                      "line": 29,
                      "column": 23,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 29,
                      "column": 26,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "body": {
                  "type": "BlockStatement",
                  "statements": [
                    {
                      "type": "ReturnStatement",
                      "argument": {
                        "type": "MemberExpression",
                        "object": {
                          "type": "ThisExpression",
                          "loc": {
                            "start": {
                              "line": 30,
                              "column": 16,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 30,
                              "column": 20,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "property": {
                          "type": "Identifier",
                          "name": "num",
                          "loc": {
                            "start": {
                              "line": 30,
                              "column": 21,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 30,
                              "column": 24,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "computed": false,
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 30,
                            "column": 16,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 30,
                            "column": 24,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 30,
                          "column": 9,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 30,
                          "column": 25,
                          "program": "union_types_1.ets"
                        }
                      }
                    }
                  ],
                  "loc": {
                    "start": {
                      "line": 29,
                      "column": 27,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 31,
                      "column": 6,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 29,
                    "column": 18,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 31,
                    "column": 6,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 29,
                  "column": 18,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 31,
                  "column": 6,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 29,
                "column": 5,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 31,
                "column": 6,
                "program": "union_types_1.ets"
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 24,
            "column": 9,
            "program": "union_types_1.ets"
          },
          "end": {
            "line": 32,
            "column": 2,
            "program": "union_types_1.ets"
          }
        }
      },
      "loc": {
        "start": {
          "line": 24,
          "column": 1,
          "program": "union_types_1.ets"
        },
        "end": {
          "line": 32,
          "column": 2,
          "program": "union_types_1.ets"
        }
      }
    },
    {
      "type": "ClassDeclaration",
      "definition": {
        "id": {
          "type": "Identifier",
          "name": "ETSGLOBAL",
          "loc": {
            "start": {
              "line": 1,
              "column": 1,
              "program": "union_types_1.ets"
            },
            "end": {
              "line": 1,
              "column": 1,
              "program": "union_types_1.ets"
            }
          }
        },
        "superClass": null,
        "implements": [],
        "body": [
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "foo",
              "loc": {
                "start": {
                  "line": 34,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 34,
                  "column": 13,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "method",
            "accessibility": "public",
            "static": true,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "foo",
                  "loc": {
                    "start": {
                      "line": 34,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 34,
                      "column": 13,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [
                  {
                    "type": "ETSParameterExpression",
                    "name": {
                      "type": "Identifier",
                      "name": "x",
                      "typeAnnotation": {
                        "type": "ETSUnionType",
                        "types": [
                          {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "A",
                                "loc": {
                                  "start": {
                                    "line": 34,
                                    "column": 18,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 34,
                                    "column": 19,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 34,
                                  "column": 18,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 34,
                                  "column": 19,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 34,
                                "column": 18,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 34,
                                "column": 19,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "B",
                                "loc": {
                                  "start": {
                                    "line": 34,
                                    "column": 22,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 34,
                                    "column": 23,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 34,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 34,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 34,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 34,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "C",
                                "loc": {
                                  "start": {
                                    "line": 34,
                                    "column": 26,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 34,
                                    "column": 27,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 34,
                                  "column": 26,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 34,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 34,
                                "column": 26,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 34,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 34,
                            "column": 18,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 34,
                            "column": 27,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 34,
                          "column": 14,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 34,
                          "column": 27,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    "loc": {
                      "start": {
                        "line": 34,
                        "column": 14,
                        "program": "union_types_1.ets"
                      },
                      "end": {
                        "line": 34,
                        "column": 27,
                        "program": "union_types_1.ets"
                      }
                    }
                  }
                ],
                "body": {
                  "type": "BlockStatement",
                  "statements": [
                    {
                      "type": "IfStatement",
                      "test": {
                        "type": "BinaryExpression",
                        "operator": "instanceof",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 35,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 35,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSTypeReference",
                          "part": {
                            "type": "ETSTypeReferencePart",
                            "name": {
                              "type": "Identifier",
                              "name": "C",
                              "loc": {
                                "start": {
                                  "line": 35,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 35,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 35,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 35,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 35,
                              "column": 22,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 35,
                              "column": 23,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 35,
                            "column": 9,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 35,
                            "column": 23,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "consequent": {
                        "type": "BlockStatement",
                        "statements": [
                          {
                            "type": "VariableDeclaration",
                            "declarations": [
                              {
                                "type": "VariableDeclarator",
                                "id": {
                                  "type": "Identifier",
                                  "name": "xx",
                                  "loc": {
                                    "start": {
                                      "line": 36,
                                      "column": 13,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 36,
                                      "column": 15,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "init": {
                                  "type": "TSAsExpression",
                                  "expression": {
                                    "type": "Identifier",
                                    "name": "x",
                                    "loc": {
                                      "start": {
                                        "line": 36,
                                        "column": 18,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 36,
                                        "column": 19,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "typeAnnotation": {
                                    "type": "ETSTypeReference",
                                    "part": {
                                      "type": "ETSTypeReferencePart",
                                      "name": {
                                        "type": "Identifier",
                                        "name": "C",
                                        "loc": {
                                          "start": {
                                            "line": 36,
                                            "column": 23,
                                            "program": "union_types_1.ets"
                                          },
                                          "end": {
                                            "line": 36,
                                            "column": 24,
                                            "program": "union_types_1.ets"
                                          }
                                        }
                                      },
                                      "loc": {
                                        "start": {
                                          "line": 36,
                                          "column": 23,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 36,
                                          "column": 24,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "loc": {
                                      "start": {
                                        "line": 36,
                                        "column": 23,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 36,
                                        "column": 24,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "loc": {
                                    "start": {
                                      "line": 36,
                                      "column": 18,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 36,
                                      "column": 24,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "loc": {
                                  "start": {
                                    "line": 36,
                                    "column": 13,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 36,
                                    "column": 24,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              }
                            ],
                            "kind": "let",
                            "loc": {
                              "start": {
                                "line": 36,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 36,
                                "column": 25,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "ExpressionStatement",
                            "expression": {
                              "type": "CallExpression",
                              "callee": {
                                "type": "MemberExpression",
                                "object": {
                                  "type": "Identifier",
                                  "name": "arktest",
                                  "loc": {
                                    "start": {
                                      "line": 37,
                                      "column": 9,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 37,
                                      "column": 16,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "property": {
                                  "type": "Identifier",
                                  "name": "assertEQ",
                                  "loc": {
                                    "start": {
                                      "line": 37,
                                      "column": 17,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 37,
                                      "column": 25,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "computed": false,
                                "optional": false,
                                "loc": {
                                  "start": {
                                    "line": 37,
                                    "column": 9,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 37,
                                    "column": 25,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "arguments": [
                                {
                                  "type": "CallExpression",
                                  "callee": {
                                    "type": "MemberExpression",
                                    "object": {
                                      "type": "Identifier",
                                      "name": "xx",
                                      "loc": {
                                        "start": {
                                          "line": 37,
                                          "column": 26,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 37,
                                          "column": 28,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "property": {
                                      "type": "Identifier",
                                      "name": "num_to_return",
                                      "loc": {
                                        "start": {
                                          "line": 37,
                                          "column": 29,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 37,
                                          "column": 42,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "computed": false,
                                    "optional": false,
                                    "loc": {
                                      "start": {
                                        "line": 37,
                                        "column": 26,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 37,
                                        "column": 42,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "arguments": [],
                                  "optional": false,
                                  "loc": {
                                    "start": {
                                      "line": 37,
                                      "column": 26,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 37,
                                      "column": 44,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "NumberLiteral",
                                  "value": 777,
                                  "loc": {
                                    "start": {
                                      "line": 37,
                                      "column": 46,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 37,
                                      "column": 49,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "StringLiteral",
                                  "value": "Error! The num field of class `C` must be 777",
                                  "loc": {
                                    "start": {
                                      "line": 37,
                                      "column": 51,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 37,
                                      "column": 98,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                }
                              ],
                              "optional": false,
                              "loc": {
                                "start": {
                                  "line": 37,
                                  "column": 9,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 37,
                                  "column": 99,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 37,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 37,
                                "column": 100,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 35,
                            "column": 25,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 38,
                            "column": 6,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "alternate": null,
                      "loc": {
                        "start": {
                          "line": 35,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 38,
                          "column": 6,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "IfStatement",
                      "test": {
                        "type": "BinaryExpression",
                        "operator": "instanceof",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 39,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 39,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSTypeReference",
                          "part": {
                            "type": "ETSTypeReferencePart",
                            "name": {
                              "type": "Identifier",
                              "name": "A",
                              "loc": {
                                "start": {
                                  "line": 39,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 39,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 39,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 39,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 39,
                              "column": 22,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 39,
                              "column": 23,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 39,
                            "column": 9,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 39,
                            "column": 23,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "consequent": {
                        "type": "BlockStatement",
                        "statements": [
                          {
                            "type": "ExpressionStatement",
                            "expression": {
                              "type": "CallExpression",
                              "callee": {
                                "type": "MemberExpression",
                                "object": {
                                  "type": "Identifier",
                                  "name": "arktest",
                                  "loc": {
                                    "start": {
                                      "line": 40,
                                      "column": 9,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 40,
                                      "column": 16,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "property": {
                                  "type": "Identifier",
                                  "name": "assertTrue",
                                  "loc": {
                                    "start": {
                                      "line": 40,
                                      "column": 17,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 40,
                                      "column": 27,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "computed": false,
                                "optional": false,
                                "loc": {
                                  "start": {
                                    "line": 40,
                                    "column": 9,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 40,
                                    "column": 27,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "arguments": [
                                {
                                  "type": "BooleanLiteral",
                                  "value": false,
                                  "loc": {
                                    "start": {
                                      "line": 40,
                                      "column": 28,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 40,
                                      "column": 33,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "StringLiteral",
                                  "value": "Error! x is instaceof C but not A",
                                  "loc": {
                                    "start": {
                                      "line": 40,
                                      "column": 35,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 40,
                                      "column": 70,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                }
                              ],
                              "optional": false,
                              "loc": {
                                "start": {
                                  "line": 40,
                                  "column": 9,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 40,
                                  "column": 71,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 40,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 40,
                                "column": 72,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 39,
                            "column": 25,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 41,
                            "column": 6,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "alternate": null,
                      "loc": {
                        "start": {
                          "line": 39,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 41,
                          "column": 6,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 42,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 42,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 42,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 42,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 42,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 42,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "MemberExpression",
                            "object": {
                              "type": "Identifier",
                              "name": "x",
                              "loc": {
                                "start": {
                                  "line": 42,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 42,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "property": {
                              "type": "Identifier",
                              "name": "num",
                              "loc": {
                                "start": {
                                  "line": 42,
                                  "column": 24,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 42,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "computed": false,
                            "optional": false,
                            "loc": {
                              "start": {
                                "line": 42,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 42,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 777,
                            "loc": {
                              "start": {
                                "line": 42,
                                "column": 29,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 42,
                                "column": 32,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! The num field of union must be 777",
                            "loc": {
                              "start": {
                                "line": 42,
                                "column": 34,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 42,
                                "column": 77,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 42,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 42,
                            "column": 78,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 42,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 42,
                          "column": 79,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "VariableDeclaration",
                      "declarations": [
                        {
                          "type": "VariableDeclarator",
                          "id": {
                            "type": "Identifier",
                            "name": "a",
                            "typeAnnotation": {
                              "type": "ETSPrimitiveType",
                              "loc": {
                                "start": {
                                  "line": 43,
                                  "column": 12,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 43,
                                  "column": 15,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 43,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 43,
                                "column": 10,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "init": {
                            "type": "BinaryExpression",
                            "operator": "+",
                            "left": {
                              "type": "MemberExpression",
                              "object": {
                                "type": "Identifier",
                                "name": "x",
                                "loc": {
                                  "start": {
                                    "line": 43,
                                    "column": 18,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 43,
                                    "column": 19,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "property": {
                                "type": "Identifier",
                                "name": "num",
                                "loc": {
                                  "start": {
                                    "line": 43,
                                    "column": 20,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 43,
                                    "column": 23,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "computed": false,
                              "optional": false,
                              "loc": {
                                "start": {
                                  "line": 43,
                                  "column": 18,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 43,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "right": {
                              "type": "NumberLiteral",
                              "value": 3,
                              "loc": {
                                "start": {
                                  "line": 43,
                                  "column": 26,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 43,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 43,
                                "column": 18,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 43,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 43,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 43,
                              "column": 27,
                              "program": "union_types_1.ets"
                            }
                          }
                        }
                      ],
                      "kind": "let",
                      "loc": {
                        "start": {
                          "line": 43,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 43,
                          "column": 28,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 44,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 44,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 44,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 44,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 44,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 44,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "Identifier",
                            "name": "a",
                            "loc": {
                              "start": {
                                "line": 44,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 44,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 780,
                            "loc": {
                              "start": {
                                "line": 44,
                                "column": 25,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 44,
                                "column": 28,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! Variable 'a' must be 780",
                            "loc": {
                              "start": {
                                "line": 44,
                                "column": 30,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 44,
                                "column": 63,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 44,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 44,
                            "column": 64,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 44,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 44,
                          "column": 65,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "AssignmentExpression",
                        "operator": "+=",
                        "left": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "x",
                            "loc": {
                              "start": {
                                "line": 45,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 45,
                                "column": 6,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "num",
                            "loc": {
                              "start": {
                                "line": 45,
                                "column": 7,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 45,
                                "column": 10,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 45,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 45,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "NumberLiteral",
                          "value": 223,
                          "loc": {
                            "start": {
                              "line": 45,
                              "column": 14,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 45,
                              "column": 17,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 45,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 45,
                            "column": 17,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 45,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 45,
                          "column": 18,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 46,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 46,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 46,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 46,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 46,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 46,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "MemberExpression",
                            "object": {
                              "type": "Identifier",
                              "name": "x",
                              "loc": {
                                "start": {
                                  "line": 46,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 46,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "property": {
                              "type": "Identifier",
                              "name": "num",
                              "loc": {
                                "start": {
                                  "line": 46,
                                  "column": 24,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 46,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "computed": false,
                            "optional": false,
                            "loc": {
                              "start": {
                                "line": 46,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 46,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 1000,
                            "loc": {
                              "start": {
                                "line": 46,
                                "column": 29,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 46,
                                "column": 33,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! The num field of union must be 1000",
                            "loc": {
                              "start": {
                                "line": 46,
                                "column": 35,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 46,
                                "column": 79,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 46,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 46,
                            "column": 80,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 46,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 46,
                          "column": 81,
                          "program": "union_types_1.ets"
                        }
                      }
                    }
                  ],
                  "loc": {
                    "start": {
                      "line": 34,
                      "column": 29,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 47,
                      "column": 2,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 34,
                    "column": 10,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 47,
                    "column": 2,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 34,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 47,
                  "column": 2,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 34,
                "column": 1,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 47,
                "column": 2,
                "program": "union_types_1.ets"
              }
            }
          },
          {
            "type": "MethodDefinition",
            "key": {
              "type": "Identifier",
              "name": "main",
              "loc": {
                "start": {
                  "line": 49,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 49,
                  "column": 14,
                  "program": "union_types_1.ets"
                }
              }
            },
            "kind": "method",
            "accessibility": "public",
            "static": true,
            "optional": false,
            "computed": false,
            "value": {
              "type": "FunctionExpression",
              "function": {
                "type": "ScriptFunction",
                "id": {
                  "type": "Identifier",
                  "name": "main",
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 10,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 49,
                      "column": 14,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "generator": false,
                "async": false,
                "expression": false,
                "params": [],
                "body": {
                  "type": "BlockStatement",
                  "statements": [
                    {
                      "type": "VariableDeclaration",
                      "declarations": [
                        {
                          "type": "VariableDeclarator",
                          "id": {
                            "type": "Identifier",
                            "name": "x",
                            "typeAnnotation": {
                              "type": "ETSUnionType",
                              "types": [
                                {
                                  "type": "ETSTypeReference",
                                  "part": {
                                    "type": "ETSTypeReferencePart",
                                    "name": {
                                      "type": "Identifier",
                                      "name": "A",
                                      "loc": {
                                        "start": {
                                          "line": 50,
                                          "column": 13,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 50,
                                          "column": 14,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "loc": {
                                      "start": {
                                        "line": 50,
                                        "column": 13,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 50,
                                        "column": 14,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "loc": {
                                    "start": {
                                      "line": 50,
                                      "column": 13,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 50,
                                      "column": 14,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "ETSTypeReference",
                                  "part": {
                                    "type": "ETSTypeReferencePart",
                                    "name": {
                                      "type": "Identifier",
                                      "name": "B",
                                      "loc": {
                                        "start": {
                                          "line": 50,
                                          "column": 17,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 50,
                                          "column": 18,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "loc": {
                                      "start": {
                                        "line": 50,
                                        "column": 17,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 50,
                                        "column": 18,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "loc": {
                                    "start": {
                                      "line": 50,
                                      "column": 17,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 50,
                                      "column": 18,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "ETSTypeReference",
                                  "part": {
                                    "type": "ETSTypeReferencePart",
                                    "name": {
                                      "type": "Identifier",
                                      "name": "C",
                                      "loc": {
                                        "start": {
                                          "line": 50,
                                          "column": 21,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 50,
                                          "column": 22,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "loc": {
                                      "start": {
                                        "line": 50,
                                        "column": 21,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 50,
                                        "column": 22,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "loc": {
                                    "start": {
                                      "line": 50,
                                      "column": 21,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 50,
                                      "column": 22,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                }
                              ],
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 13,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 50,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 50,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 50,
                                "column": 10,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "init": null,
                          "loc": {
                            "start": {
                              "line": 50,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 50,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        }
                      ],
                      "kind": "let",
                      "loc": {
                        "start": {
                          "line": 50,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 50,
                          "column": 23,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "AssignmentExpression",
                        "operator": "=",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 51,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 51,
                              "column": 6,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSNewClassInstanceExpression",
                          "typeReference": {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "C",
                                "loc": {
                                  "start": {
                                    "line": 51,
                                    "column": 13,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 51,
                                    "column": 14,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 51,
                                  "column": 13,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 51,
                                  "column": 14,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 51,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 51,
                                "column": 14,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "arguments": [
                            {
                              "type": "NumberLiteral",
                              "value": 777,
                              "loc": {
                                "start": {
                                  "line": 51,
                                  "column": 15,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 51,
                                  "column": 18,
                                  "program": "union_types_1.ets"
                                }
                              }
                            }
                          ],
                          "loc": {
                            "start": {
                              "line": 51,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 51,
                              "column": 20,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 51,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 51,
                            "column": 20,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 51,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 51,
                          "column": 20,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "Identifier",
                          "name": "foo",
                          "loc": {
                            "start": {
                              "line": 52,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 52,
                              "column": 8,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "Identifier",
                            "name": "x",
                            "loc": {
                              "start": {
                                "line": 52,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 52,
                                "column": 10,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 52,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 52,
                            "column": 11,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 52,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 52,
                          "column": 12,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 53,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 53,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 53,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 53,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 53,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 53,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "MemberExpression",
                            "object": {
                              "type": "Identifier",
                              "name": "x",
                              "loc": {
                                "start": {
                                  "line": 53,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 53,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "property": {
                              "type": "Identifier",
                              "name": "num",
                              "loc": {
                                "start": {
                                  "line": 53,
                                  "column": 24,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 53,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "computed": false,
                            "optional": false,
                            "loc": {
                              "start": {
                                "line": 53,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 53,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 1000,
                            "loc": {
                              "start": {
                                "line": 53,
                                "column": 29,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 53,
                                "column": 33,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! The num field of union must be 1000",
                            "loc": {
                              "start": {
                                "line": 53,
                                "column": 35,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 53,
                                "column": 79,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 53,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 53,
                            "column": 80,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 53,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 53,
                          "column": 81,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "IfStatement",
                      "test": {
                        "type": "BinaryExpression",
                        "operator": "instanceof",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 54,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 54,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSTypeReference",
                          "part": {
                            "type": "ETSTypeReferencePart",
                            "name": {
                              "type": "Identifier",
                              "name": "C",
                              "loc": {
                                "start": {
                                  "line": 54,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 54,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 54,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 54,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 54,
                              "column": 22,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 54,
                              "column": 23,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 54,
                            "column": 9,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 54,
                            "column": 23,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "consequent": {
                        "type": "BlockStatement",
                        "statements": [
                          {
                            "type": "VariableDeclaration",
                            "declarations": [
                              {
                                "type": "VariableDeclarator",
                                "id": {
                                  "type": "Identifier",
                                  "name": "xx",
                                  "loc": {
                                    "start": {
                                      "line": 55,
                                      "column": 13,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 55,
                                      "column": 15,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "init": {
                                  "type": "TSAsExpression",
                                  "expression": {
                                    "type": "Identifier",
                                    "name": "x",
                                    "loc": {
                                      "start": {
                                        "line": 55,
                                        "column": 18,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 55,
                                        "column": 19,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "typeAnnotation": {
                                    "type": "ETSTypeReference",
                                    "part": {
                                      "type": "ETSTypeReferencePart",
                                      "name": {
                                        "type": "Identifier",
                                        "name": "C",
                                        "loc": {
                                          "start": {
                                            "line": 55,
                                            "column": 23,
                                            "program": "union_types_1.ets"
                                          },
                                          "end": {
                                            "line": 55,
                                            "column": 24,
                                            "program": "union_types_1.ets"
                                          }
                                        }
                                      },
                                      "loc": {
                                        "start": {
                                          "line": 55,
                                          "column": 23,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 55,
                                          "column": 24,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "loc": {
                                      "start": {
                                        "line": 55,
                                        "column": 23,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 55,
                                        "column": 24,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "loc": {
                                    "start": {
                                      "line": 55,
                                      "column": 18,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 55,
                                      "column": 24,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "loc": {
                                  "start": {
                                    "line": 55,
                                    "column": 13,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 55,
                                    "column": 24,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              }
                            ],
                            "kind": "let",
                            "loc": {
                              "start": {
                                "line": 55,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 55,
                                "column": 25,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "ExpressionStatement",
                            "expression": {
                              "type": "CallExpression",
                              "callee": {
                                "type": "MemberExpression",
                                "object": {
                                  "type": "Identifier",
                                  "name": "arktest",
                                  "loc": {
                                    "start": {
                                      "line": 56,
                                      "column": 9,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 56,
                                      "column": 16,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "property": {
                                  "type": "Identifier",
                                  "name": "assertEQ",
                                  "loc": {
                                    "start": {
                                      "line": 56,
                                      "column": 17,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 56,
                                      "column": 25,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "computed": false,
                                "optional": false,
                                "loc": {
                                  "start": {
                                    "line": 56,
                                    "column": 9,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 56,
                                    "column": 25,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "arguments": [
                                {
                                  "type": "CallExpression",
                                  "callee": {
                                    "type": "MemberExpression",
                                    "object": {
                                      "type": "Identifier",
                                      "name": "xx",
                                      "loc": {
                                        "start": {
                                          "line": 56,
                                          "column": 26,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 56,
                                          "column": 28,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "property": {
                                      "type": "Identifier",
                                      "name": "num_to_return",
                                      "loc": {
                                        "start": {
                                          "line": 56,
                                          "column": 29,
                                          "program": "union_types_1.ets"
                                        },
                                        "end": {
                                          "line": 56,
                                          "column": 42,
                                          "program": "union_types_1.ets"
                                        }
                                      }
                                    },
                                    "computed": false,
                                    "optional": false,
                                    "loc": {
                                      "start": {
                                        "line": 56,
                                        "column": 26,
                                        "program": "union_types_1.ets"
                                      },
                                      "end": {
                                        "line": 56,
                                        "column": 42,
                                        "program": "union_types_1.ets"
                                      }
                                    }
                                  },
                                  "arguments": [],
                                  "optional": false,
                                  "loc": {
                                    "start": {
                                      "line": 56,
                                      "column": 26,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 56,
                                      "column": 44,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "NumberLiteral",
                                  "value": 1000,
                                  "loc": {
                                    "start": {
                                      "line": 56,
                                      "column": 46,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 56,
                                      "column": 50,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "StringLiteral",
                                  "value": "Error! The num field of class `C` must be 1000",
                                  "loc": {
                                    "start": {
                                      "line": 56,
                                      "column": 52,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 56,
                                      "column": 100,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                }
                              ],
                              "optional": false,
                              "loc": {
                                "start": {
                                  "line": 56,
                                  "column": 9,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 56,
                                  "column": 101,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 56,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 56,
                                "column": 102,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 54,
                            "column": 25,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 57,
                            "column": 6,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "alternate": null,
                      "loc": {
                        "start": {
                          "line": 54,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 57,
                          "column": 6,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "IfStatement",
                      "test": {
                        "type": "BinaryExpression",
                        "operator": "instanceof",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 58,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 58,
                              "column": 10,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSTypeReference",
                          "part": {
                            "type": "ETSTypeReferencePart",
                            "name": {
                              "type": "Identifier",
                              "name": "B",
                              "loc": {
                                "start": {
                                  "line": 58,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 58,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 58,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 58,
                                "column": 23,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 58,
                              "column": 22,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 58,
                              "column": 23,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 58,
                            "column": 9,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 58,
                            "column": 23,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "consequent": {
                        "type": "BlockStatement",
                        "statements": [
                          {
                            "type": "ExpressionStatement",
                            "expression": {
                              "type": "CallExpression",
                              "callee": {
                                "type": "MemberExpression",
                                "object": {
                                  "type": "Identifier",
                                  "name": "arktest",
                                  "loc": {
                                    "start": {
                                      "line": 59,
                                      "column": 9,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 59,
                                      "column": 16,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "property": {
                                  "type": "Identifier",
                                  "name": "assertTrue",
                                  "loc": {
                                    "start": {
                                      "line": 59,
                                      "column": 17,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 59,
                                      "column": 27,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                "computed": false,
                                "optional": false,
                                "loc": {
                                  "start": {
                                    "line": 59,
                                    "column": 9,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 59,
                                    "column": 27,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "arguments": [
                                {
                                  "type": "BooleanLiteral",
                                  "value": false,
                                  "loc": {
                                    "start": {
                                      "line": 59,
                                      "column": 28,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 59,
                                      "column": 33,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                },
                                {
                                  "type": "StringLiteral",
                                  "value": "Error! x is instaceof C but not B",
                                  "loc": {
                                    "start": {
                                      "line": 59,
                                      "column": 35,
                                      "program": "union_types_1.ets"
                                    },
                                    "end": {
                                      "line": 59,
                                      "column": 70,
                                      "program": "union_types_1.ets"
                                    }
                                  }
                                }
                              ],
                              "optional": false,
                              "loc": {
                                "start": {
                                  "line": 59,
                                  "column": 9,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 59,
                                  "column": 71,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 59,
                                "column": 9,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 59,
                                "column": 72,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 58,
                            "column": 25,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 60,
                            "column": 6,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "alternate": null,
                      "loc": {
                        "start": {
                          "line": 58,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 60,
                          "column": 6,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "AssignmentExpression",
                        "operator": "=",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 61,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 61,
                              "column": 6,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSNewClassInstanceExpression",
                          "typeReference": {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "A",
                                "loc": {
                                  "start": {
                                    "line": 61,
                                    "column": 13,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 61,
                                    "column": 14,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 61,
                                  "column": 13,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 61,
                                  "column": 14,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 61,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 61,
                                "column": 14,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "arguments": [],
                          "loc": {
                            "start": {
                              "line": 61,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 61,
                              "column": 17,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 61,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 61,
                            "column": 17,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 61,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 61,
                          "column": 17,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 62,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 62,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 62,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 62,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 62,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 62,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "MemberExpression",
                            "object": {
                              "type": "Identifier",
                              "name": "x",
                              "loc": {
                                "start": {
                                  "line": 62,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 62,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "property": {
                              "type": "Identifier",
                              "name": "num",
                              "loc": {
                                "start": {
                                  "line": 62,
                                  "column": 24,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 62,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "computed": false,
                            "optional": false,
                            "loc": {
                              "start": {
                                "line": 62,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 62,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 41,
                            "loc": {
                              "start": {
                                "line": 62,
                                "column": 29,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 62,
                                "column": 31,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! The num field of union must be 41",
                            "loc": {
                              "start": {
                                "line": 62,
                                "column": 33,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 62,
                                "column": 75,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 62,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 62,
                            "column": 76,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 62,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 62,
                          "column": 77,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "AssignmentExpression",
                        "operator": "=",
                        "left": {
                          "type": "Identifier",
                          "name": "x",
                          "loc": {
                            "start": {
                              "line": 63,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 63,
                              "column": 6,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "right": {
                          "type": "ETSNewClassInstanceExpression",
                          "typeReference": {
                            "type": "ETSTypeReference",
                            "part": {
                              "type": "ETSTypeReferencePart",
                              "name": {
                                "type": "Identifier",
                                "name": "B",
                                "loc": {
                                  "start": {
                                    "line": 63,
                                    "column": 13,
                                    "program": "union_types_1.ets"
                                  },
                                  "end": {
                                    "line": 63,
                                    "column": 14,
                                    "program": "union_types_1.ets"
                                  }
                                }
                              },
                              "loc": {
                                "start": {
                                  "line": 63,
                                  "column": 13,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 63,
                                  "column": 14,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "loc": {
                              "start": {
                                "line": 63,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 63,
                                "column": 14,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "arguments": [],
                          "loc": {
                            "start": {
                              "line": 63,
                              "column": 9,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 63,
                              "column": 17,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 63,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 63,
                            "column": 17,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 63,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 63,
                          "column": 17,
                          "program": "union_types_1.ets"
                        }
                      }
                    },
                    {
                      "type": "ExpressionStatement",
                      "expression": {
                        "type": "CallExpression",
                        "callee": {
                          "type": "MemberExpression",
                          "object": {
                            "type": "Identifier",
                            "name": "arktest",
                            "loc": {
                              "start": {
                                "line": 64,
                                "column": 5,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 64,
                                "column": 12,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "name": "assertEQ",
                            "loc": {
                              "start": {
                                "line": 64,
                                "column": 13,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 64,
                                "column": 21,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          "computed": false,
                          "optional": false,
                          "loc": {
                            "start": {
                              "line": 64,
                              "column": 5,
                              "program": "union_types_1.ets"
                            },
                            "end": {
                              "line": 64,
                              "column": 21,
                              "program": "union_types_1.ets"
                            }
                          }
                        },
                        "arguments": [
                          {
                            "type": "MemberExpression",
                            "object": {
                              "type": "Identifier",
                              "name": "x",
                              "loc": {
                                "start": {
                                  "line": 64,
                                  "column": 22,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 64,
                                  "column": 23,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "property": {
                              "type": "Identifier",
                              "name": "num",
                              "loc": {
                                "start": {
                                  "line": 64,
                                  "column": 24,
                                  "program": "union_types_1.ets"
                                },
                                "end": {
                                  "line": 64,
                                  "column": 27,
                                  "program": "union_types_1.ets"
                                }
                              }
                            },
                            "computed": false,
                            "optional": false,
                            "loc": {
                              "start": {
                                "line": 64,
                                "column": 22,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 64,
                                "column": 27,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "NumberLiteral",
                            "value": 42,
                            "loc": {
                              "start": {
                                "line": 64,
                                "column": 29,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 64,
                                "column": 31,
                                "program": "union_types_1.ets"
                              }
                            }
                          },
                          {
                            "type": "StringLiteral",
                            "value": "Error! The num field of union must be 42",
                            "loc": {
                              "start": {
                                "line": 64,
                                "column": 33,
                                "program": "union_types_1.ets"
                              },
                              "end": {
                                "line": 64,
                                "column": 75,
                                "program": "union_types_1.ets"
                              }
                            }
                          }
                        ],
                        "optional": false,
                        "loc": {
                          "start": {
                            "line": 64,
                            "column": 5,
                            "program": "union_types_1.ets"
                          },
                          "end": {
                            "line": 64,
                            "column": 76,
                            "program": "union_types_1.ets"
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 64,
                          "column": 5,
                          "program": "union_types_1.ets"
                        },
                        "end": {
                          "line": 64,
                          "column": 77,
                          "program": "union_types_1.ets"
                        }
                      }
                    }
                  ],
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 17,
                      "program": "union_types_1.ets"
                    },
                    "end": {
                      "line": 65,
                      "column": 2,
                      "program": "union_types_1.ets"
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 49,
                    "column": 10,
                    "program": "union_types_1.ets"
                  },
                  "end": {
                    "line": 65,
                    "column": 2,
                    "program": "union_types_1.ets"
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 49,
                  "column": 10,
                  "program": "union_types_1.ets"
                },
                "end": {
                  "line": 65,
                  "column": 2,
                  "program": "union_types_1.ets"
                }
              }
            },
            "overloads": [],
            "loc": {
              "start": {
                "line": 49,
                "column": 1,
                "program": "union_types_1.ets"
              },
              "end": {
                "line": 65,
                "column": 2,
                "program": "union_types_1.ets"
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 1,
            "column": 1,
            "program": "union_types_1.ets"
          },
          "end": {
            "line": 1,
            "column": 1,
            "program": "union_types_1.ets"
          }
        }
      },
      "loc": {
        "start": {
          "line": 1,
          "column": 1,
          "program": "union_types_1.ets"
        },
        "end": {
          "line": 1,
          "column": 1,
          "program": "union_types_1.ets"
        }
      }
    }
  ],
  "loc": {
    "start": {
      "line": 1,
      "column": 1,
      "program": "union_types_1.ets"
    },
    "end": {
      "line": 67,
      "column": 1,
      "program": "union_types_1.ets"
    }
  }
}
[union_types_1.ets:36:18] Warning W670214: This cast can be excessive because it always succeeds
[union_types_1.ets:54:9] Warning W1001506: the value of the instanceof expression is known at compile-time as true
[union_types_1.ets:55:18] Warning W670214: This cast can be excessive because it always succeeds
[union_types_1.ets:58:9] Warning W1001506: the value of the instanceof expression is known at compile-time as false
