Skip to content

Commit f58c59b

Browse files
committed
apply changes suggested in #893
1 parent e7a3991 commit f58c59b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/behaviortree_cpp/tree_node.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ inline Result TreeNode::setOutput(const std::string& key, const T& value)
598598

599599
if constexpr(std::is_same_v<BT::Any, T>)
600600
{
601-
if(config().manifest->ports.at(key).type() != typeid(BT::Any))
601+
auto port_type = config().manifest->ports.at(key).type();
602+
if(port_type != typeid(BT::Any) && port_type != typeid(BT::AnyTypeAllowed))
602603
{
603604
throw LogicError("setOutput<Any> is not allowed, unless the port "
604605
"was declared using OutputPort<Any>");

0 commit comments

Comments
 (0)