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

Improved recursive checks in InferGenericArgument

This commit is contained in:
Brian Fiete 2022-05-25 14:41:17 -07:00
parent f1257fb7fc
commit 0c34e62df2
2 changed files with 25 additions and 24 deletions

View file

@ -136,7 +136,7 @@ public:
class BfGenericInferContext
{
public:
HashSet<BfType*> mCheckedTypeSet;
HashSet<int64> mCheckedTypeSet;
BfModule* mModule;
BfTypeVector* mCheckMethodGenericArguments;
SizedArray<BfIRValue, 4> mPrevArgValues;
@ -148,7 +148,9 @@ public:
mModule = NULL;
mInferredCount = 0;
}
bool InferGenericArgument(BfMethodInstance* methodInstance, BfType* argType, BfType* wantType, BfIRValue argValue);
bool AddToCheckedSet(BfType* argType, BfType* wantType);
bool InferGenericArgument(BfMethodInstance* methodInstance, BfType* argType, BfType* wantType, BfIRValue argValue, bool checkCheckedSet = false);
int GetUnresolvedCount()
{
return (int)mCheckMethodGenericArguments->size() - mInferredCount;