Skip to content

Commit

Permalink
fixed Inheritance caching bug and typeName management
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeioris committed Nov 4, 2024
1 parent 36f2aab commit d9e6788
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/composition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,11 @@ static bool InheritPrimSpecImpl(PrimSpec &dst, const PrimSpec &src,
// Then override it with `dst`
PrimSpec ps = src; // copy

// Keep PrimSpec name, typeName and spec from `dst`
// Keep PrimSpec name, typeName (if not empty) and spec from `dst`
ps.name() = dst.name();
ps.typeName() = dst.typeName();
if (!dst.typeName().empty()) {
ps.typeName() = dst.typeName();
}
ps.specifier() = dst.specifier();

// Override metadataum
Expand Down
3 changes: 2 additions & 1 deletion src/prim-types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,8 @@ bool Layer::find_primspec_at(const Path &path, const PrimSpec **ps,
auto ret = _primspec_path_cache.find(path.prim_part());
if (ret != _primspec_path_cache.end()) {
DCOUT("Found cache.");
return ret->second;
(*ps) = ret->second;
return true;
}
}

Expand Down

0 comments on commit d9e6788

Please sign in to comment.