1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Throw error on illegal aliases

This commit is contained in:
Brian Fiete 2020-12-25 10:47:38 -08:00
parent 8c391fe4f5
commit bc5668ada5
2 changed files with 10 additions and 1 deletions

View file

@ -1104,6 +1104,15 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType
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)
{
AddDependency(aliasToType, typeAlias, BfDependencyMap::DependencyFlag_DerivedFrom);

View file

@ -2731,7 +2731,7 @@ bool WinDebugger::DoUpdate()
if (!handled)
{
OutputMessage(StrFormat("Skipping first chance exception %08Xd at address %@ in thread %d\n", exceptionRecord->ExceptionCode, exceptionRecord->ExceptionAddress, threadInfo->mThreadId));
OutputMessage(StrFormat("Skipping first chance exception %08X at address %@ in thread %d\n", exceptionRecord->ExceptionCode, exceptionRecord->ExceptionAddress, threadInfo->mThreadId));
::ContinueDebugEvent(mDebuggerWaitingThread->mProcessId, mDebuggerWaitingThread->mThreadId, DBG_EXCEPTION_NOT_HANDLED);
mIsDebuggerWaiting = false;
}