Skip to content

Commit 7fbee97

Browse files
committed
fix a typekey_hash mistake with typeof(Union{})
Type{Union[}} == typeof(Union{}) is an unusual special case
1 parent 12acd69 commit 7fbee97

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/jltypes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,8 @@ static unsigned type_hash(jl_value_t *kj, int *failed) JL_NOTSAFEPOINT
10041004

10051005
static unsigned typekey_hash(jl_typename_t *tn, jl_value_t **key, size_t n, int nofail) JL_NOTSAFEPOINT
10061006
{
1007+
if (tn == jl_type_typename && key[0] == jl_bottom_type)
1008+
return jl_typeofbottom_type->hash;
10071009
size_t j;
10081010
unsigned hash = 3;
10091011
int failed = nofail;

0 commit comments

Comments
 (0)