1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Refactored generic type instances to be a BfGenericTypeInfo member

This commit is contained in:
Brian Fiete 2020-06-05 07:01:58 -07:00
parent 5d9a5f183d
commit 9f00539d90
16 changed files with 504 additions and 578 deletions

View file

@ -1540,10 +1540,10 @@ bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken
// ?. should look inside nullable types
if (targetValue.mType->IsNullable())
{
BfGenericTypeInstance* nullableType = (BfGenericTypeInstance*)targetValue.mType->ToTypeInstance();
BfTypeInstance* nullableType = (BfTypeInstance*)targetValue.mType->ToTypeInstance();
targetValue = mModule->MakeAddressable(targetValue);
BfIRValue valuePtr = mModule->mBfIRBuilder->CreateInBoundsGEP(targetValue.mValue, 0, 1); // mValue
targetValue = BfTypedValue(valuePtr, nullableType->mTypeGenericArguments[0], true);
targetValue = BfTypedValue(valuePtr, nullableType->mGenericTypeInfo->mTypeGenericArguments[0], true);
}
}
}