diff options
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 135632ba8..7726fd6c8 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2909,7 +2909,7 @@ Expr* SemanticsExprVisitor::convertToLogicOperatorExpr(InvokeExpr* expr) if (auto varExpr = as<VarExpr>(expr->functionExpr)) { - if ((varExpr->name->text == "&&") || (varExpr->name->text == "||")) + if ((getText(varExpr->name) == "&&") || (getText(varExpr->name) == "||")) { // We only use short-circuiting in scalar input, will fall back // to non-short-circuiting in vector input. @@ -3790,8 +3790,10 @@ Expr* SemanticsExprVisitor::visitTypeCastExpr(TypeCastExpr* expr) InitializerListExpr* initListExpr = m_astBuilder->create<InitializerListExpr>(); initListExpr->loc = expr->loc; + initListExpr->useCStyleInitialization = false; auto checkedInitListExpr = visitInitializerListExpr(initListExpr); + return coerce(CoercionSite::General, typeExp.type, checkedInitListExpr); } } |
