1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added proper support for explicit 'this' in functions

This commit is contained in:
Brian Fiete 2020-07-10 06:40:24 -07:00
parent 4a08a9702e
commit 7f726ef9ba
8 changed files with 438 additions and 142 deletions

View file

@ -30,7 +30,8 @@ enum BfResolveTypeRefFlags
BfResolveTypeRefFlag_FromIndirectSource = 0x80, // Such as a type alias or a generic parameter
BfResolveTypeRefFlag_Attribute = 0x100,
BfResolveTypeRefFlag_NoReify = 0x200,
BfResolveTypeRefFlag_NoCreate = 0x400
BfResolveTypeRefFlag_NoCreate = 0x400,
BfResolveTypeRefFlag_NoWarnOnMut = 0x800
};
enum BfTypeNameFlags : uint16
@ -413,12 +414,14 @@ class BfDelegateInfo
public:
Array<BfAstNode*> mDirectAllocNodes;
BfType* mReturnType;
Array<BfType*> mParams;
BfType* mFunctionThisType;
Array<BfType*> mParams;
public:
BfDelegateInfo()
{
mReturnType = NULL;
mFunctionThisType = NULL;
}
~BfDelegateInfo()
@ -860,6 +863,7 @@ public:
bool IsSpecializedGenericMethodOrType();
bool IsSpecializedByAutoCompleteMethod();
bool HasThis();
bool HasExplicitThis();
bool HasParamsArray();
int GetStructRetIdx();
bool HasSelf();