Skip to content

Commit f175dd0

Browse files
committed
remove asserts
type-intersect makes mistakes, and does not need to crash the process when it does
1 parent d710318 commit f175dd0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

base/staticdata.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function method_morespecific_via_interferences(method1::Method, method2::Method)
313313
return false
314314
end
315315
ms = method_in_interferences_recursive(method2, method1, IdSet{Method}())
316-
# slow check: @assert ms === morespecific(method1, method2) || typeintersect(method1.sig, method2.sig) === Union{}
316+
# slow check: @assert ms === morespecific(method1, method2) || typeintersect(method1.sig, method2.sig) === Union{} || typeintersect(method2.sig, method1.sig) === Union{}
317317
return ms
318318
end
319319

src/gf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,8 +2744,7 @@ static int method_morespecific_via_interferences(jl_method_t *target_method, jl_
27442744
arraylist_new(&seen, 0);
27452745
int result = method_in_interferences_recursive(start_method, target_method, &seen);
27462746
arraylist_free(&seen);
2747-
assert(result == jl_method_morespecific(target_method, start_method));
2748-
assert(!jl_has_empty_intersection(target_method->sig, start_method->sig));
2747+
//assert(result == jl_method_morespecific(target_method, start_method) || jl_has_empty_intersection(target_method->sig, start_method->sig) || jl_has_empty_intersection(start_method->sig, target_method->sig));
27492748
return result;
27502749
}
27512750

0 commit comments

Comments
 (0)