Skip to content

Commit

Permalink
typemap: small correction against forming an invalid query
Browse files Browse the repository at this point in the history
If the parameter is a TypeVar, it cnan have subtypes that might appear
in the map itself and require a scan to locate.
  • Loading branch information
vtjnash committed Jul 2, 2020
1 parent 7dba988 commit 2538f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int jl_typemap_intersection_visitor(jl_typemap_t *map, int offs,
}
if (cache->targ != (jl_array_t*)jl_an_empty_vec_any) {
jl_value_t *typetype = jl_is_type_type(ty) ? jl_tparam0(ty) : NULL;
if (typetype) {
if (typetype && !jl_has_free_typevars(typetype)) {
if (is_cache_leaf(typetype)) {
// direct lookup of leaf types
jl_typemap_t *ml = mtcache_hash_lookup(cache->targ, typetype);
Expand Down

0 comments on commit 2538f93

Please sign in to comment.