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 /tests/diagnostics/param-mutation.slang | |
| 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 'tests/diagnostics/param-mutation.slang')
| -rw-r--r-- | tests/diagnostics/param-mutation.slang | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/diagnostics/param-mutation.slang b/tests/diagnostics/param-mutation.slang index 835e645c8..723c4c212 100644 --- a/tests/diagnostics/param-mutation.slang +++ b/tests/diagnostics/param-mutation.slang @@ -20,8 +20,6 @@ int doThing(MutatingStruct s, int v) // For non-copyable types (such as HitObject or NonCopyableStruct declared below), if passed as as `in` // should produce an error. -// NOTE! This *doesn't* produce an error (or warning) because NonCopyable types are *implicitly* -// made *ref* when parsed as arguments. [__NonCopyableType] struct NonCopyableStruct @@ -32,7 +30,6 @@ struct NonCopyableStruct int doThing2(NonCopyableStruct s, int v) { - // Currently doesn't produce an error/warning because NonCopyableStruct is passed as *ref* implicitly. s.setValue(v + 1); return s.m_value; } |
