mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Error on non-consteval properties with 'var' types
This commit is contained in:
parent
ecc38960f3
commit
3ae310e9a8
1 changed files with 6 additions and 0 deletions
|
@ -23904,6 +23904,12 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
|||
{
|
||||
SetAndRestoreValue<bool> prevIngoreErrors(mIgnoreErrors, mIgnoreErrors || (methodDef->GetPropertyDeclaration() != NULL));
|
||||
|
||||
if (methodDef->mReturnTypeRef->IsA<BfVarTypeReference>())
|
||||
{
|
||||
// An invalid 'var' error would not have been caught in the original property type pass
|
||||
mIgnoreErrors = false;
|
||||
}
|
||||
|
||||
BfResolveTypeRefFlags flags = (BfResolveTypeRefFlags)(BfResolveTypeRefFlag_NoResolveGenericParam | BfResolveTypeRefFlag_AllowRef | BfResolveTypeRefFlag_AllowRefGeneric);
|
||||
|
||||
if ((((methodInstance->mComptimeFlags & BfComptimeFlag_ConstEval) != 0) || (methodInstance->mIsAutocompleteMethod))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue