summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index f340bd6fd..79482ea6e 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -4449,7 +4449,7 @@ void SemanticsVisitor::addModifiersToSynthesizedDecl(
auto synStaticModifier = m_astBuilder->create<HLSLStaticModifier>();
synthesized->modifiers.first = synStaticModifier;
}
- else
+ else if (context)
{
// For a non-`static` requirement, we need a `this` parameter.
//