mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Handled generic depth limitation for pointers, delegates, tuples, arrays
This commit is contained in:
parent
dcafa5f9ca
commit
ceb400d573
5 changed files with 74 additions and 42 deletions
|
@ -15196,19 +15196,11 @@ BfTypedValue BfExprEvaluator::MakeCallableTarget(BfAstNode* targetSrc, BfTypedVa
|
|||
{
|
||||
auto underlying = target.mType->GetUnderlyingType();
|
||||
bool underlyingIsStruct = underlying->IsStruct();
|
||||
// if (underlying->IsGenericParam())
|
||||
// {
|
||||
// auto genericParam = mModule->GetGenericParamInstance((BfGenericParamType*)underlying);
|
||||
// if (((genericParam->mTypeConstraint != NULL) && (genericParam->mTypeConstraint->IsValueType())) ||
|
||||
// ((genericParam->mGenericParamFlags & (BfGenericParamFlag_Struct)) != 0))
|
||||
// underlyingIsStruct = true;
|
||||
// }
|
||||
|
||||
if (underlyingIsStruct)
|
||||
{
|
||||
auto pointerType = (BfPointerType*)target.mType;
|
||||
target = mModule->LoadValue(target);
|
||||
target.mType = pointerType->mElementType;
|
||||
target.mType = underlying;
|
||||
target.mKind = BfTypedValueKind_Addr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue