summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-check-expr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index d0b82c6bd..f79e23b42 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -4176,6 +4176,10 @@ namespace Slang
Expr* SemanticsExprVisitor::visitInitializerListExpr(InitializerListExpr* expr)
{
+ // If we are assigned a type, expr has already been legalized
+ if(expr->type)
+ return expr;
+
// When faced with an initializer list, we first just check the sub-expressions blindly.
// Actually making them conform to a desired type will wait for when we know the desired
// type based on context.