mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
New nullable support
This commit is contained in:
parent
59233cc996
commit
88adb3a1cd
16 changed files with 963 additions and 143 deletions
|
@ -275,6 +275,30 @@ bool BfModule::AreConstraintsSubset(BfGenericParamInstance* checkInner, BfGeneri
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BfModule::CheckConstraintState(BfAstNode* refNode)
|
||||
{
|
||||
if (mContext->mCurConstraintState == NULL)
|
||||
return true;
|
||||
|
||||
auto checkState = mContext->mCurConstraintState->mPrevState;
|
||||
while (checkState != NULL)
|
||||
{
|
||||
if (*checkState == *mContext->mCurConstraintState)
|
||||
{
|
||||
if (refNode != NULL)
|
||||
{
|
||||
Fail("Constraints cause circular operator invocations", refNode);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
checkState = checkState->mPrevState;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BfModule::ShouldAllowMultipleDefinitions(BfTypeInstance* typeInst, BfTypeDef* firstDeclaringTypeDef, BfTypeDef* secondDeclaringTypeDef)
|
||||
{
|
||||
if (firstDeclaringTypeDef == secondDeclaringTypeDef)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue