1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-11 12:54:15 +02:00

Fixed undef const crash

This commit is contained in:
Brian Fiete 2020-07-01 06:28:50 -07:00
parent 008f37cdba
commit a48f6b43c1

View file

@ -2485,7 +2485,7 @@ void BfAutoComplete::CheckLocalRef(BfAstNode* identifierNode, BfLocalVariable* v
if (IsAutocompleteNode(identifierNode)) if (IsAutocompleteNode(identifierNode))
{ {
String constStr; String constStr;
if (varDecl->mConstValue) if (varDecl->mConstValue.IsConst())
constStr = ConstantToString(mModule->mBfIRBuilder, varDecl->mConstValue); constStr = ConstantToString(mModule->mBfIRBuilder, varDecl->mConstValue);
if (!constStr.IsEmpty()) if (!constStr.IsEmpty())
{ {