Skip to content

Commit f29ccce

Browse files
committed
Recursive IsComplexType call.
1 parent 0956d9e commit f29ccce

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/NodeEngine/NE_Value.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool IsComplexType (const ValueConstPtr& val)
196196
}
197197
bool isType = true;
198198
listVal->Enumerate ([&] (const ValueConstPtr& innerVal) {
199-
if (!Value::IsType<Type> (innerVal)) {
199+
if (!IsComplexType<Type> (innerVal)) {
200200
isType = false;
201201
}
202202
});

Sources/NodeEngineTest/ValueTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ TEST (FlattenTest)
180180
theListValue->Push (innerListValue);
181181

182182
ValueConstPtr flatten = FlattenValue (theListValue);
183+
ASSERT (IsComplexType<IntValue> (theListValue));
184+
ASSERT (IsComplexType<IntValue> (flatten));
183185
ASSERT (Value::IsType<ListValue> (flatten));
184186
ListValueConstPtr flattenList = Value::Cast<ListValue> (flatten);
185187
ASSERT (flattenList->GetSize () == 3);

0 commit comments

Comments
 (0)