1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Improved method selection with failed method match

This commit is contained in:
Brian Fiete 2020-12-03 11:34:56 -08:00
parent b49e513494
commit 1b9921981e
2 changed files with 35 additions and 20 deletions

View file

@ -152,6 +152,14 @@ public:
MatchFailKind_CheckedMismatch
};
enum BackupMatchKind
{
BackupMatchKind_None,
BackupMatchKind_TooManyArgs,
BackupMatchKind_EarlyMismatch,
BackupMatchKind_PartialLastArgMatch
};
public:
BfAstNode* mTargetSrc;
BfTypedValue mTarget;
@ -181,6 +189,7 @@ public:
BfType* mSelfType; // Only when matching interfaces when 'Self' needs to refer back to the implementing type
BfMethodDef* mBackupMethodDef;
BackupMatchKind mBackupMatchKind;
int mBackupArgMatchCount;
BfMethodDef* mBestMethodDef;
BfTypeInstance* mBestMethodTypeInstance;