mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Disallowed 'self' usage in static section
This commit is contained in:
parent
d5b7fc3bbe
commit
4ee40c8a06
1 changed files with 7 additions and 0 deletions
|
@ -8047,6 +8047,13 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
|
|||
if ((selfType->IsSpecializedType()) || (selfType->IsUnspecializedTypeVariation()))
|
||||
selfType = ResolveTypeDef(selfType->ToTypeInstance()->mTypeDef, populateType);
|
||||
}
|
||||
if (selfType != NULL)
|
||||
{
|
||||
auto selfTypeInst = selfType->ToTypeInstance();
|
||||
if ((selfTypeInst != NULL) && (selfTypeInst->mTypeDef->IsGlobalsContainer()))
|
||||
selfType = NULL;
|
||||
}
|
||||
|
||||
if (selfType == NULL)
|
||||
{
|
||||
Fail("'Self' type is not usable here", typeRef);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue