mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Equality fix
This commit is contained in:
parent
8fe9843441
commit
74bbdbadbf
1 changed files with 8 additions and 8 deletions
|
@ -4189,12 +4189,6 @@ void BfModule::CreateValueTypeEqualsMethod(bool strictEquals)
|
|||
return;
|
||||
|
||||
auto boolType = GetPrimitiveType(BfTypeCode_Boolean);
|
||||
if (mCurTypeInstance->IsValuelessType())
|
||||
{
|
||||
mBfIRBuilder->CreateRet(GetDefaultValue(boolType));
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurTypeInstance->IsTypedPrimitive())
|
||||
{
|
||||
BfExprEvaluator exprEvaluator(this);
|
||||
|
@ -4210,6 +4204,12 @@ void BfModule::CreateValueTypeEqualsMethod(bool strictEquals)
|
|||
auto compareType = mCurMethodInstance->mParams[0].mResolvedType;
|
||||
bool isValid = true;
|
||||
|
||||
if (compareType->IsValuelessType())
|
||||
{
|
||||
mBfIRBuilder->CreateRet(GetDefaultValue(boolType));
|
||||
return;
|
||||
}
|
||||
|
||||
auto compareDType = compareType->ToDependedType();
|
||||
BfTypeInstance* compareTypeInst = compareType->ToTypeInstance();
|
||||
if (compareTypeInst != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue