Don't fail when no default ctor is given
This commit is contained in:
parent
72da0b8d87
commit
b00bd59027
1 changed files with 6 additions and 1 deletions
|
@ -76,8 +76,13 @@ namespace wren {
|
|||
return ConstructResult{1, true};
|
||||
}
|
||||
else {
|
||||
if constexpr (sizeof...(Args) > 0) {
|
||||
return ForeignClassHelper<T, Args...>::construct(vm, cardinality, memory);
|
||||
}
|
||||
else {
|
||||
return ConstructResult{0, false};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue