summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-check-decl.cpp1
-rw-r--r--source/slang/slang-check-expr.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index e7c2a5853..8c11e538d 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -1017,6 +1017,7 @@ namespace Slang
// We need to ensure that any variable doesn't introduce
// a constant with a circular definition.
//
+ varDecl->setCheckState(DeclCheckState::Checked);
_validateCircularVarDefinition(varDecl);
}
else
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index 39fd7d1dd..47f5436c5 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -858,6 +858,7 @@ namespace Slang
if(!initExpr)
return nullptr;
+ ensureDecl(declRef.decl, DeclCheckState::Checked);
ConstantFoldingCircularityInfo newCircularityInfo(decl, circularityInfo);
return tryConstantFoldExpr(initExpr, &newCircularityInfo);
}