Fix functional for no parameters

This commit is contained in:
drmortalwombat 2024-05-25 22:05:31 +02:00
parent 884fe50dd7
commit b1b5ee737b
3 changed files with 6 additions and 2 deletions

View File

@ -51,6 +51,11 @@ public:
f.c = nullptr; f.c = nullptr;
} }
function(void)
{
c = nullptr;
}
function & operator=(const function & f) function & operator=(const function & f)
{ {
if (c != f.c) if (c != f.c)

View File

@ -1715,7 +1715,7 @@ bool Declaration::ResolveTemplate(Declaration* fdec, Declaration* tdec)
{ {
if (tpdec->mBase->mType == DT_PACK_TEMPLATE) if (tpdec->mBase->mType == DT_PACK_TEMPLATE)
{ {
if (fpdec->mBase->mType == DT_PACK_TEMPLATE) if (fpdec && fpdec->mBase->mType == DT_PACK_TEMPLATE)
mScope->Insert(tdec->mIdent, fpdec); mScope->Insert(tdec->mIdent, fpdec);
else else
{ {

View File

@ -6104,7 +6104,6 @@ int Parser::OverloadDistance(Declaration* fdec, Expression* pexp)
{ {
if (pexp->mRight && pexp->mRight->mDecType->IsConstSame(fdec->mBase->mParams->mBase->mBase)) if (pexp->mRight && pexp->mRight->mDecType->IsConstSame(fdec->mBase->mParams->mBase->mBase))
return NOOVERLOAD; return NOOVERLOAD;
printf("oopsie");
} }
} }