Skip to content

Commit

Permalink
fix #27361, error adding method using e.g. Tuple{3} (#27404)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Jun 5, 2018
1 parent 61c01aa commit f89921f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/subtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -2332,8 +2332,10 @@ static int sub_msp(jl_value_t *a, jl_value_t *b, jl_typeenv_t *env)
{
JL_GC_PUSH2(&a, &b);
while (env != NULL) {
a = jl_type_unionall(env->var, a);
b = jl_type_unionall(env->var, b);
if (jl_is_type(a) || jl_is_typevar(a))
a = jl_type_unionall(env->var, a);
if (jl_is_type(b) || jl_is_typevar(b))
b = jl_type_unionall(env->var, b);
env = env->prev;
}
int sub = jl_subtype(a, b);
Expand Down
5 changes: 5 additions & 0 deletions test/specificity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,8 @@ let A = Tuple{Vector, AbstractVector},
@test args_morespecific(B, C)
@test args_morespecific(A, C)
end

# issue #27361
f27361(::M) where M <: Tuple{2} = nothing
f27361(::M) where M <: Tuple{3} = nothing
@test length(methods(f27361)) == 2

2 comments on commit f89921f

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job:

NanosoldierError: failed to run benchmarks against primary commit: failed process: Process(`sudo cset shield -e su nanosoldier -- -c ./benchscript.sh`, ProcessExited(1)) [1]

Logs and partial data can be found here
cc @ararslan

Please sign in to comment.