summaryrefslogtreecommitdiffstats
path: root/source/slang/check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/check.cpp')
-rw-r--r--source/slang/check.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index 11efb2f7d..dfa726150 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -1887,6 +1887,10 @@ namespace Slang
}
virtual RefPtr<ExpressionSyntaxNode> VisitConstantExpression(ConstantExpressionSyntaxNode *expr) override
{
+ // The expression might already have a type, determined by its suffix
+ if(expr->Type.type)
+ return expr;
+
switch (expr->ConstType)
{
case ConstantExpressionSyntaxNode::ConstantType::Int: