Skip to content

Commit b66195f

Browse files
fix: fix getcalledparameter namespacing issues
1 parent 16e85f9 commit b66195f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/parameters.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ end
3333

3434
function getcalledparameter(x)
3535
x = unwrap(x)
36-
return getmetadata(x, CallWithParent)
36+
# `parent` is a `CallWithMetadata` with the correct metadata,
37+
# but no namespacing. `operation(x)` has the correct namespacing,
38+
# but is not a `CallWithMetadata` and doesn't have any metadata.
39+
# This approach combines both.
40+
parent = getmetadata(x, CallWithParent)
41+
return CallWithMetadata(operation(x), metadata(parent))
3742
end
3843

3944
"""

0 commit comments

Comments
 (0)