diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 4 | ||||
| -rw-r--r-- | source/slang/slang-parser.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 75b1b7024..0c0b1ec9d 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2331,6 +2331,10 @@ Expr* SemanticsVisitor::CheckSimpleSubscriptExpr(IndexExpr* subscriptExpr, Type* return CreateErrorExpr(subscriptExpr); } + for (auto& expr : subscriptExpr->indexExprs) + { + expr = CheckExpr(expr); + } auto indexExpr = subscriptExpr->indexExprs[0]; if (!isScalarIntegerType(indexExpr->type.type)) diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index f968f9fe1..565cb2e5f 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -2426,8 +2426,8 @@ static Expr* tryParseGenericApp(Parser* parser, Expr* base) for (auto candidate : overloadedExpr->lookupResult2) { if (candidate.declRef.is<GenericDecl>() || - declRefExpr->declRef.is<FunctionDeclBase>() || - declRefExpr->declRef.is<AggTypeDeclBase>()) + candidate.declRef.is<FunctionDeclBase>() || + candidate.declRef.is<AggTypeDeclBase>()) { baseKind = BaseGenericKind::Generic; break; |
