Add enum to int conversion in function call overload

This commit is contained in:
drmortalwombat 2023-11-07 08:08:44 +01:00
parent 06ab48461b
commit e43c086545

View File

@ -6007,6 +6007,8 @@ int Parser::OverloadDistance(Declaration* fdec, Expression* pexp)
dist += 0;
else if (ptype->mType == DT_TYPE_INTEGER && etype->mType == DT_TYPE_FLOAT)
dist += 16;
else if (ptype->mType == DT_TYPE_INTEGER && etype->mType == DT_TYPE_ENUM)
dist += 32;
else if (ptype->mType == DT_TYPE_FLOAT && etype->mType == DT_TYPE_INTEGER)
dist += 8;
else if (ptype->IsSame(ex->mDecType))