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

Added CallingConvention support, mangle specifying

This commit is contained in:
Brian Fiete 2020-05-04 07:15:38 -07:00
parent 904f907f1d
commit 61d9edea83
26 changed files with 413 additions and 96 deletions

View file

@ -7275,8 +7275,16 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
auto resolvedType = ResolveTypeRef(refTypeRef->mElementType, BfPopulateType_Identity, BfResolveTypeRefFlag_AllowGenericParamConstValue);
if (resolvedType != NULL)
{
if ((resolvedType->IsComposite()) || (resolvedType->IsGenericParam()))
needsRefWrap = true;
if ((resolvedType->IsValueType()) || (resolvedType->IsGenericParam()))
needsRefWrap = true;
if ((InDefinitionSection()) && (!resolvedType->IsGenericParam()))
{
if (!resolvedType->IsValueType())
Warn(0, StrFormat("Specified 'mut' has no effect on '%s' since reference types are always mutable", TypeToString(resolvedType).c_str()), refTypeRef->mRefToken);
else
Warn(0, "Use 'mut' for generic arguments which may or may not be reference types. Consider using 'ref' here, instead.", refTypeRef->mRefToken);
}
}
if (!needsRefWrap)