summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTheresa Foley <10618364+tangent-vector@users.noreply.github.com>2025-10-02 21:48:11 -0700
committerGitHub <noreply@github.com>2025-10-03 04:48:11 +0000
commitcc8f6a241edb47c43c5698ee33abed4fe57d4566 (patch)
treed40789640b6b5901c305332ded7f751e48037e93 /tests
parent0c778339d7e3c39f600af2cc049f13f661d3434b (diff)
Rename some symbols related to pointers types (#8592)
Note that while this change touched a large numer of files, there are no changes to functionality being made here. The only things being done are renaming various symbols and, in a few cases, updating or adding comments for consistency with the new names. The core of the naming changes are: * Most things named to refer to `OutType` (e.g., `IROutType`, `IRBuilder::getOutType()`, etc.) have been consistently renamed to refer to `OutParamType`, to emphasize that the relevant AST/IR node types are only intended for use to represent `out` parameters. * The same change as described above for `OutType` is also made for `RefType`, which becomes `RefParamType` in most cases. One mess that this exposes is the way that the `ExplicitRef<T>` type in the core module currently lowers to `IRRefParamType`. This change sticks to the rule of not making functional changes, so that mess is left as-is for now. * Names referring to `InOutType` have been changed to instead refer to `BorrowInOutType`. The intention with this naming change is to emphasize that the Slang rules for `inout` are semantically those of a borrow (or at least our interpretation of what a borrow means). * Names referring to `ConstRefType` have been changed to instead refer to `BorrowInType`. This change starts work on clarifying that the existing `__constref` modifier was never intended to be a read-only analogue of `__ref`, and instead is the input-only analogue of `inout`. * The `ParameterDirection` enum type has been changed to `ParamPassingMode`, to reflect the fact that the concept of "direction" fails to capture what is actually being encoded, particularly once we have modes beyond simple `in`/`out`/`inout`. While this change does not alter behavior in any case (the user-exposed Slang language is unchanged), it is intended to set up subsequence changes that will work to make the handling of these types in the compiler more nuanced and correct. Breaking this part of the change out separately is primarily motivated by a desire to minimize the effort for reviewers. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/diagnostics/const-ref-differentiable-param.slang2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/diagnostics/const-ref-differentiable-param.slang b/tests/diagnostics/const-ref-differentiable-param.slang
index c345826e7..354744701 100644
--- a/tests/diagnostics/const-ref-differentiable-param.slang
+++ b/tests/diagnostics/const-ref-differentiable-param.slang
@@ -32,7 +32,7 @@ struct MyType2
float compute1(float x) { return 0; }
}
-// CHECK-DAG: {{.*}}(5): error 38034: cannot use '__constref' on a differentiable parameter.
+// CHECK-DAG: {{.*}}(5): error 38034: cannot use 'borrow in' on a differentiable parameter.
// CHECK-NOT {{.*}}error
// CHECK-DAG: {{.*}}(14): error 38034: cannot use '[constref]' on a differentiable member method of a differentiable type.
// CHECK-NOT {{.*}}error