Skip to content

Commit 4a6023c

Browse files
committed
Check type hash as an early out in egal types
1 parent 0f9190b commit 4a6023c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/builtins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ static int egal_types(const jl_value_t *a, const jl_value_t *b, jl_typeenv_t *en
147147
{
148148
if (a == b)
149149
return 1;
150+
if (a->hash && b->hash && a->hash != b->hash)
151+
return 0;
150152
uintptr_t dtag = jl_typetagof(a);
151153
if (dtag != jl_typetagof(b))
152154
return 0;

0 commit comments

Comments
 (0)