public Type resolve(Scope s, int tag) {
        Type type1, type2;
        resolveExpr(test, s, tag);
        int newTag = Indexer.idx.newThread();
        if (body != null) {
            type1 = resolveExpr(body, s, newTag);
        } else {
            type1 = Indexer.idx.builtins.Cont;
        }
        if (orelse != null) {
            type2 = resolveExpr(orelse, s, -newTag);
        } else {
            type2 = Indexer.idx.builtins.Cont;
        }
        return UnionType.union(type1, type2);
    }