diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-28 18:07:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-28 18:07:40 -0700 |
| commit | b7d318f48db2cb83a41d665f1727ae93fc555124 (patch) | |
| tree | d81d69cbba264cd059bbe67f29235226032c4793 /source/slang/slang-ast-type.cpp | |
| parent | e7238942ea003e134b325fa65296df8e19368e90 (diff) | |
Support `constref` parameters passing. (#3249)
* Support `constref` parameters passing.
* Fix.
* Fix.
* Add test and diagnostic on mix use of __constref and no_diff.
* check for [constref] on differentiable member method.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
| -rw-r--r-- | source/slang/slang-ast-type.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index f80de86fd..a29ff9bb3 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -372,6 +372,10 @@ ParameterDirection FuncType::getParamDirection(Index index) { return kParameterDirection_Ref; } + else if (as<ConstRefType>(paramType)) + { + return kParameterDirection_ConstRef; + } else if (as<InOutType>(paramType)) { return kParameterDirection_InOut; |
