Skip to content

Commit c4cb289

Browse files
committed
mention canonicalize flag
1 parent 5d836a5 commit c4cb289

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

src/frontend/Typechecker.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,9 @@ let check_lvalue cf tenv = function
778778
add_warning loc
779779
"Nested multi-indexing on the left hand side of assignment does not \
780780
behave the same as nested indexing in expressions. This is \
781-
considered a bug and will be disallowed in Stan 2.32.0." ;
781+
considered a bug and will be disallowed in Stan 2.32.0. The \
782+
indexing can be automatically fixed using the canonicalize flag for \
783+
stanc." ;
782784
let lvalue_rvalue_types_differ =
783785
try
784786
let flat_type =

test/integration/cli-args/canonicalize/canonical.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ generated quantities {
238238
Warning in 'deprecated.stan', line 36, column 2: Nested multi-indexing on the
239239
left hand side of assignment does not behave the same as nested indexing
240240
in expressions. This is considered a bug and will be disallowed in Stan
241-
2.32.0.
241+
2.32.0. The indexing can be automatically fixed using the canonicalize
242+
flag for stanc.
242243
$ ../../../../../install/default/bin/stanc --print-canonical funs.stanfunctions
243244
// comment test comment
244245
void test(int x, int y) {

test/integration/cli-args/canonicalize/deprecations-only.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ generated quantities {
218218
Warning in 'deprecated.stan', line 36, column 2: Nested multi-indexing on the
219219
left hand side of assignment does not behave the same as nested indexing
220220
in expressions. This is considered a bug and will be disallowed in Stan
221-
2.32.0.
221+
2.32.0. The indexing can be automatically fixed using the canonicalize
222+
flag for stanc.
222223
$ ../../../../../install/default/bin/stanc --auto-format --canonicalize deprecations funs.stanfunctions
223224
// comment test comment
224225
void test(int x, int y) {

test/integration/good/warning/pretty.expected

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,15 +2379,18 @@ transformed data {
23792379
Warning in 'lvalue_multiindex.stan', line 6, column 3: Nested multi-indexing
23802380
on the left hand side of assignment does not behave the same as nested
23812381
indexing in expressions. This is considered a bug and will be disallowed
2382-
in Stan 2.32.0.
2382+
in Stan 2.32.0. The indexing can be automatically fixed using the
2383+
canonicalize flag for stanc.
23832384
Warning in 'lvalue_multiindex.stan', line 7, column 3: Nested multi-indexing
23842385
on the left hand side of assignment does not behave the same as nested
23852386
indexing in expressions. This is considered a bug and will be disallowed
2386-
in Stan 2.32.0.
2387+
in Stan 2.32.0. The indexing can be automatically fixed using the
2388+
canonicalize flag for stanc.
23872389
Warning in 'lvalue_multiindex.stan', line 9, column 3: Nested multi-indexing
23882390
on the left hand side of assignment does not behave the same as nested
23892391
indexing in expressions. This is considered a bug and will be disallowed
2390-
in Stan 2.32.0.
2392+
in Stan 2.32.0. The indexing can be automatically fixed using the
2393+
canonicalize flag for stanc.
23912394
$ ../../../../../install/default/bin/stanc --auto-format matrix_pow_warning.stan
23922395
data {
23932396
int<lower=0> N;

0 commit comments

Comments
 (0)