mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +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;
|
||||
}
|
||||
|
||||
mModule->AddDependency(type, mModule->mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference);
|
||||
mResult = BfTypedValue(mModule->CreateTypeDataRef(type), typeType);
|
||||
if (type->IsGenericParam())
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue