mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed mixin const evaluation
This commit is contained in:
parent
e1c340a711
commit
78bb60cddc
1 changed files with 29 additions and 24 deletions
|
@ -3755,6 +3755,7 @@ BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance,
|
||||||
// auto-created underlying type and it will cause an 'error flash'. We defer errors until the full resolve for that purpose
|
// auto-created underlying type and it will cause an 'error flash'. We defer errors until the full resolve for that purpose
|
||||||
resolveFlags = BfConstResolveFlag_NoCast;
|
resolveFlags = BfConstResolveFlag_NoCast;
|
||||||
}
|
}
|
||||||
|
UpdateSrcPos(initializer);
|
||||||
return constResolver.Resolve(initializer, fieldType, resolveFlags);
|
return constResolver.Resolve(initializer, fieldType, resolveFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9333,7 +9334,7 @@ String BfModule::MethodToString(BfMethodInstance* methodInst, BfMethodNameFlags
|
||||||
methodName = TypeToString(type, typeNameFlags);
|
methodName = TypeToString(type, typeNameFlags);
|
||||||
if (methodName == "$")
|
if (methodName == "$")
|
||||||
methodName = "";
|
methodName = "";
|
||||||
else
|
else if (!methodName.IsEmpty())
|
||||||
methodName += ".";
|
methodName += ".";
|
||||||
}
|
}
|
||||||
String accessorString;
|
String accessorString;
|
||||||
|
@ -12608,6 +12609,8 @@ BfLocalVariable* BfModule::AddLocalVariableDef(BfLocalVariable* localVarDef, boo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mBfIRBuilder->mIgnoreWrites)
|
||||||
|
{
|
||||||
auto diVariable = mBfIRBuilder->DbgCreateAutoVariable(mCurMethodState->mCurScope->mDIScope,
|
auto diVariable = mBfIRBuilder->DbgCreateAutoVariable(mCurMethodState->mCurScope->mDIScope,
|
||||||
localVarDef->mName, mCurFilePosition.mFileInstance->mDIFile, mCurFilePosition.mCurLine, diType, initType);
|
localVarDef->mName, mCurFilePosition.mFileInstance->mDIFile, mCurFilePosition.mCurLine, diType, initType);
|
||||||
localVarDef->mDbgVarInst = diVariable;
|
localVarDef->mDbgVarInst = diVariable;
|
||||||
|
@ -12638,6 +12641,7 @@ BfLocalVariable* BfModule::AddLocalVariableDef(BfLocalVariable* localVarDef, boo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
localVarDef->mDeclBlock = mBfIRBuilder->GetInsertBlock();
|
localVarDef->mDeclBlock = mBfIRBuilder->GetInsertBlock();
|
||||||
DoAddLocalVariable(localVarDef);
|
DoAddLocalVariable(localVarDef);
|
||||||
|
@ -19488,7 +19492,8 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
BfType* resolvedReturnType = NULL;
|
BfType* resolvedReturnType = NULL;
|
||||||
if (((methodDef->mMethodType == BfMethodType_Normal) || (methodDef->mMethodType == BfMethodType_CtorCalcAppend) || (methodDef->mMethodType == BfMethodType_PropertyGetter) || (methodDef->mMethodType == BfMethodType_Operator)) &&
|
if (((methodDef->mMethodType == BfMethodType_Normal) || (methodDef->mMethodType == BfMethodType_Extension) || (methodDef->mMethodType == BfMethodType_CtorCalcAppend) ||
|
||||||
|
(methodDef->mMethodType == BfMethodType_PropertyGetter) || (methodDef->mMethodType == BfMethodType_Operator)) &&
|
||||||
(methodDef->mReturnTypeRef != NULL))
|
(methodDef->mReturnTypeRef != NULL))
|
||||||
{
|
{
|
||||||
SetAndRestoreValue<bool> prevIngoreErrors(mIgnoreErrors, mIgnoreErrors || (methodDef->GetPropertyDeclaration() != NULL));
|
SetAndRestoreValue<bool> prevIngoreErrors(mIgnoreErrors, mIgnoreErrors || (methodDef->GetPropertyDeclaration() != NULL));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue