From 20ab16178e45d07b4dc0104a7a98865d18440b62 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 9 Feb 2024 22:00:15 -0800 Subject: Support link-time constants. (#3564) * Support link-time constants. * Fix. * Fix. --- source/slang/slang-check-expr.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-check-expr.cpp') diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 2f4906826..c04cb73e4 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -1659,6 +1659,9 @@ namespace Slang return nullptr; if(!decl->hasModifier()) return nullptr; + // Extern static const is not considered compile-time constant by the front-end. + if (decl->hasModifier()) + return nullptr; if (isInterfaceRequirement(decl)) { -- cgit v1.2.3