Skip to content

Commit

Permalink
[jnc_rtl] fix: ClassType::createObject should return NULL, not false
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkos committed Jul 31, 2024
1 parent 8e46bb8 commit 20e3ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jnc_ext/jnc_rtl_intro/jnc_rtl_ClassType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ IfaceHdr*
ClassType::createObject() {
if (m_item->getFlags() & (ClassTypeFlag_HasAbstractMethods | ClassTypeFlag_OpaqueNonCreatable)) {
err::setFormatStringError("cannot instantiate '%s'", m_item->getTypeString().sz());
return false;
return NULL;
}

IfaceHdr* p = jnc::rt::getCurrentThreadRuntime()->getGcHeap()->allocateClass(m_item);
Expand Down

0 comments on commit 20e3ed5

Please sign in to comment.