mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Throw error on illegal aliases
This commit is contained in:
parent
8c391fe4f5
commit
bc5668ada5
2 changed files with 10 additions and 1 deletions
|
@ -1103,6 +1103,15 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType
|
|||
if (typeAliasDecl->mAliasToType != NULL)
|
||||
aliasToType = ResolveTypeRef(typeAliasDecl->mAliasToType, BfPopulateType_IdentityNoRemapAlias);
|
||||
}
|
||||
|
||||
if (aliasToType != NULL)
|
||||
{
|
||||
if (aliasToType->IsConstExprValue())
|
||||
{
|
||||
Fail(StrFormat("Illegal alias to type '%s'", TypeToString(aliasToType).c_str()), typeAlias->mTypeDef->GetRefNode());
|
||||
aliasToType = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (aliasToType != NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue