Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Inheritance caching bug and typeName management #210

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading