mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved generic param reflection in comptime
This commit is contained in:
parent
157d3f90e5
commit
26506efc1e
9 changed files with 143 additions and 19 deletions
|
@ -10593,15 +10593,8 @@ void BfExprEvaluator::Visit(BfTypeOfExpression* typeOfExpr)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((type->IsGenericParam()) && (!mModule->mIsComptimeModule))
|
||||
{
|
||||
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);
|
||||
}
|
||||
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