mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Restrict const expression usage to generic arguments
This commit is contained in:
parent
2b9443744b
commit
071dfa8e09
4 changed files with 19 additions and 3 deletions
|
@ -2658,7 +2658,15 @@ public:
|
|||
|
||||
int tryCount = 0;
|
||||
ctx->mFailed = false;
|
||||
int hashVal = Hash(findType, ctx, BfHashFlag_AllowRef);
|
||||
|
||||
BfHashFlags hashFlags = BfHashFlag_AllowRef;
|
||||
if ((ctx->mResolveFlags & BfResolveTypeRefFlag_AllowGenericParamConstValue) != 0)
|
||||
{
|
||||
ctx->mResolveFlags = (BfResolveTypeRefFlags)(ctx->mResolveFlags & ~BfResolveTypeRefFlag_AllowGenericParamConstValue);
|
||||
hashFlags = (BfHashFlags)(hashFlags | BfHashFlag_AllowGenericParamConstValue);
|
||||
}
|
||||
|
||||
int hashVal = Hash(findType, ctx, hashFlags);
|
||||
if ((ctx->mFailed) || (ctx->mHadVar))
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue