Example #1
0
int sigs_eq(jl_value_t *a, jl_value_t *b, int useenv)
{
    if (jl_has_typevars(a) || jl_has_typevars(b)) {
        return jl_types_equal_generic(a,b,useenv);
    }
    return jl_subtype(a, b, 0) && jl_subtype(b, a, 0);
}
Example #2
0
File: gf.c Project: cshen/julia
static int sigs_eq(jl_value_t *a, jl_value_t *b)
{
    if (jl_has_typevars(a) || jl_has_typevars(b)) {
        return jl_types_equal_generic(a,b);
    }
    return jl_types_equal(a, b);
}
Example #3
0
int sigs_eq(jl_value_t *a, jl_value_t *b, int useenv)
{
    // useenv == 0 : subtyping + ensure typevars correspond
    // useenv == 1 : subtyping + ensure typevars correspond + fail if bound != bound in some typevar match
    // useenv == 2 : ignore typevars (because UnionAll getting lost in intersection can cause jl_types_equal to fail in the wrong direction for some purposes)
    if (useenv != 2 && (jl_has_typevars(a) || jl_has_typevars(b))) {
        return jl_types_equal_generic(a, b, useenv);
    }
    return jl_subtype(a, b, 0) && jl_subtype(b, a, 0);
}