mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Made typeof(T) evaluate as undef
This commit is contained in:
parent
a7da8a75d6
commit
048c1c1ab8
1 changed files with 9 additions and 2 deletions
|
@ -10269,8 +10269,15 @@ void BfExprEvaluator::Visit(BfTypeOfExpression* typeOfExpr)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mModule->AddDependency(type, mModule->mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference);
|
if (type->IsGenericParam())
|
||||||
mResult = BfTypedValue(mModule->CreateTypeDataRef(type), typeType);
|
{
|
||||||
|
mResult = BfTypedValue(mModule->mBfIRBuilder->GetUndefConstValue(mModule->mBfIRBuilder->MapType(typeType)), typeType);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mModule->AddDependency(type, mModule->mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference);
|
||||||
|
mResult = BfTypedValue(mModule->CreateTypeDataRef(type), typeType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BfExprEvaluator::LookupTypeProp(BfTypeOfExpression* typeOfExpr, BfIdentifierNode* propName)
|
bool BfExprEvaluator::LookupTypeProp(BfTypeOfExpression* typeOfExpr, BfIdentifierNode* propName)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue