Skip to content

Commit 2c125c8

Browse files
authored
[core] Fix bug in callable op interface. (#3585)
Signed-off-by: Eric Schweitz <[email protected]>
1 parent 4c56a3c commit 2c125c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/cudaq/Optimizer/Dialect/Quake/QuakeOps.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ def quake_ApplyOp : QuakeOp<"apply",
443443

444444
/// Return the callee of this operation.
445445
mlir::CallInterfaceCallable getCallableForCallee() {
446-
return (*this)->getAttrOfType<mlir::SymbolRefAttr>(getCalleeAttrName());
446+
if (getCallee())
447+
return (*this)->getAttrOfType<mlir::SymbolRefAttr>(getCalleeAttrName());
448+
return getIndirectCallee().front();
447449
}
448450
}];
449451
}

0 commit comments

Comments
 (0)