mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
null checks
This commit is contained in:
parent
cf5c969d1f
commit
2130715f21
2 changed files with 9 additions and 0 deletions
|
@ -3240,6 +3240,9 @@ BfError* BfModule::Warn(int warningNum, const StringImpl& warning, BfAstNode* re
|
|||
|
||||
void BfModule::CheckErrorAttributes(BfTypeInstance* typeInstance, BfMethodInstance* methodInstance, BfCustomAttributes* customAttributes, BfAstNode* targetSrc)
|
||||
{
|
||||
if (customAttributes == NULL)
|
||||
return;
|
||||
|
||||
auto _AddDeclarationMoreInfo = [&]()
|
||||
{
|
||||
if (methodInstance != NULL)
|
||||
|
|
|
@ -11479,6 +11479,12 @@ BfType* BfModule::ResolveTypeRef_Type(BfAstNode* astNode, const BfSizedArray<BfA
|
|||
|
||||
BfType* BfModule::ResolveTypeRef(BfAstNode* astNode, const BfSizedArray<BfAstNode*>* genericArgs, BfPopulateType populateType, BfResolveTypeRefFlags resolveFlags)
|
||||
{
|
||||
if (astNode == NULL)
|
||||
{
|
||||
AssertErrorState();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (auto typeRef = BfNodeDynCast<BfTypeReference>(astNode))
|
||||
return ResolveTypeRef(typeRef, populateType, resolveFlags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue