From b7d318f48db2cb83a41d665f1727ae93fc555124 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 28 Sep 2023 18:07:40 -0700 Subject: 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 --- tests/diagnostics/param-mutation.slang | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests/diagnostics/param-mutation.slang') 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; } -- cgit v1.2.3