1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Diallow mut mismatch on function bind

This commit is contained in:
Brian Fiete 2021-12-15 10:48:42 -05:00
parent ba9d99fa76
commit 6a95cbb3b8
4 changed files with 26 additions and 20 deletions

View file

@ -10524,7 +10524,7 @@ bool BfModule::HasMixin(BfTypeInstance* typeInstance, const StringImpl& methodNa
}
StringT<128> BfModule::MethodToString(BfMethodInstance* methodInst, BfMethodNameFlags methodNameFlags, BfTypeVector* typeGenericArgs, BfTypeVector* methodGenericArgs)
{
{
auto methodDef = methodInst->mMethodDef;
bool allowResolveGenericParamNames = ((methodNameFlags & BfMethodNameFlag_ResolveGenericParamNames) != 0);
@ -10769,8 +10769,16 @@ StringT<128> BfModule::MethodToString(BfMethodInstance* methodInst, BfMethodName
if (accessorString.length() != 0)
{
methodName += " " + accessorString;
methodName += " ";
methodName += accessorString;
}
if ((methodNameFlags & BfMethodNameFlag_IncludeMut) != 0)
{
if ((methodDef->mIsMutating) && (methodInst->GetOwner()->IsValueType()))
methodName += " mut";
}
return methodName;
}