mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Field lambda name collision inside field ctor with multiple ctors
This commit is contained in:
parent
a3211809c6
commit
affd740ff4
1 changed files with 9 additions and 6 deletions
|
@ -11549,12 +11549,15 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
methodDef->mName.RemoveToEnd(prevSepPos);
|
||||
}
|
||||
|
||||
// if (closureTypeInst != NULL)
|
||||
// {
|
||||
// StringT<128> typeInstName;
|
||||
// BfMangler::Mangle(typeInstName,mModule->mCompiler->GetMangleKind(), closureTypeInst);
|
||||
// closureHashCtx.MixinStr(typeInstName);
|
||||
// }
|
||||
// Mix in this because this can be emitted multiple times when there's multiple ctors and field initializers with lambdas
|
||||
if (mModule->mCurMethodInstance->mMethodDef->mMethodType == BfMethodType_Ctor)
|
||||
{
|
||||
if (auto ctorDecl = BfNodeDynCast<BfConstructorDeclaration>(mModule->mCurMethodInstance->mMethodDef->mMethodDeclaration))
|
||||
{
|
||||
if (ctorDecl->mThisToken != NULL)
|
||||
closureHashCtx.Mixin(ctorDecl->mThisToken->GetStartCharId());
|
||||
}
|
||||
}
|
||||
|
||||
auto checkMethodState = mModule->mCurMethodState;
|
||||
while (checkMethodState != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue