mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +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;
|
return;
|
||||||
|
|
||||||
auto boolType = GetPrimitiveType(BfTypeCode_Boolean);
|
auto boolType = GetPrimitiveType(BfTypeCode_Boolean);
|
||||||
if (mCurTypeInstance->IsValuelessType())
|
|
||||||
{
|
|
||||||
mBfIRBuilder->CreateRet(GetDefaultValue(boolType));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mCurTypeInstance->IsTypedPrimitive())
|
if (mCurTypeInstance->IsTypedPrimitive())
|
||||||
{
|
{
|
||||||
BfExprEvaluator exprEvaluator(this);
|
BfExprEvaluator exprEvaluator(this);
|
||||||
|
@ -4210,6 +4204,12 @@ void BfModule::CreateValueTypeEqualsMethod(bool strictEquals)
|
||||||
auto compareType = mCurMethodInstance->mParams[0].mResolvedType;
|
auto compareType = mCurMethodInstance->mParams[0].mResolvedType;
|
||||||
bool isValid = true;
|
bool isValid = true;
|
||||||
|
|
||||||
|
if (compareType->IsValuelessType())
|
||||||
|
{
|
||||||
|
mBfIRBuilder->CreateRet(GetDefaultValue(boolType));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto compareDType = compareType->ToDependedType();
|
auto compareDType = compareType->ToDependedType();
|
||||||
BfTypeInstance* compareTypeInst = compareType->ToTypeInstance();
|
BfTypeInstance* compareTypeInst = compareType->ToTypeInstance();
|
||||||
if (compareTypeInst != NULL)
|
if (compareTypeInst != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue