diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-07-12 18:02:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-12 18:02:36 -0400 |
| commit | bbd9c2e6d7b57f5acc3238083ab2f7c7b140df5e (patch) | |
| tree | b6abec59b4ff3fe92436db35c1e61a6df236f550 /source/slang/slang-check-expr.cpp | |
| parent | 4ed3aafa20b667329f2f9dea94d7c65dc2e80db4 (diff) | |
Extend `no_diff` to support subscript operations on resources and array variables… (#2981)
* Extend `no_diff` to support subscript operations on resources and array variables
* Update autodiff.slang.expected
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 6b050aa89..9af8fd867 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2712,7 +2712,7 @@ namespace Slang { innerExpr = parenExpr->base; } - if (!as<InvokeExpr>(innerExpr)) + if (!as<InvokeExpr>(innerExpr) && !as<IndexExpr>(innerExpr)) { getSink()->diagnose(expr, Diagnostics::invalidUseOfNoDiff); } |
