Skip to content

Commit 55f3d9a

Browse files
Fixed grammatical errors (Issue #2493) (#2510)
1 parent aff543e commit 55f3d9a

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,8 +1520,7 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
15201520
int64_t value_int = -1;
15211521
if( !ASRUtils::extract_value(ASRUtils::expr_value(value), value_int) &&
15221522
contains_local_variable(value) && !is_allocatable) {
1523-
throw SemanticError("Only those local variables which can be reduced to compile "
1524-
"time constant should be used in dimensions of an array.",
1523+
throw SemanticError("Only those local variables that can be reduced to compile-time constants should be used in dimensions of an array.",
15251524
value->base.loc);
15261525
}
15271526
if (value_int != -1) {

tests/reference/asr-arrays_09-50ee586.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"stdout": null,
99
"stdout_hash": null,
1010
"stderr": "asr-arrays_09-50ee586.stderr",
11-
"stderr_hash": "30bfc87e70c4b4688cf7162eec34dce8e52c959539d20ad8b79cf845",
11+
"stderr_hash": "0169175ca66ace6110382408ed4506313e311d560e9b8c16bdd997b3",
1212
"returncode": 2
1313
}

tests/reference/asr-arrays_09-50ee586.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
1+
semantic error: Only those local variables that can be reduced to compile-time constants should be used in dimensions of an array.
22
--> tests/errors/arrays_09.py:9:12
33
|
44
9 | x: i64[p, q, r] = empty([q, p, r], dtype=int64)

tests/reference/asr-arrays_10-bc82d75.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"stdout": null,
99
"stdout_hash": null,
1010
"stderr": "asr-arrays_10-bc82d75.stderr",
11-
"stderr_hash": "59e8cc91d7dae61bf60ec4d9cd23d62cdcb162e553bd64a3995fad19",
11+
"stderr_hash": "1c45f4b45b48ceb3de4567413bff847b67df2750fcc68d6a358df096",
1212
"returncode": 2
1313
}

tests/reference/asr-arrays_10-bc82d75.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
1+
semantic error: Only those local variables that can be reduced to compile-time constants should be used in dimensions of an array.
22
--> tests/errors/arrays_10.py:9:36
33
|
44
9 | x: i64[100, 120, 200] = empty([q, p, r], dtype=int64)

tests/reference/asr-bindc_04-06bd800.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"stdout": null,
99
"stdout_hash": null,
1010
"stderr": "asr-bindc_04-06bd800.stderr",
11-
"stderr_hash": "20c105d0189cd06a197a6b1dda073a58f5c8ee0104230cf187960c46",
11+
"stderr_hash": "85d50c491c17976f21e6263e164a6ce5dbeda95dae2635f589a02d86",
1212
"returncode": 2
1313
}

tests/reference/asr-bindc_04-06bd800.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
1+
semantic error: Only those local variables that can be reduced to compile-time constants should be used in dimensions of an array.
22
--> tests/errors/bindc_04.py:20:12
33
|
44
20 | C: i16[nk] = empty(nk, dtype=int16)

0 commit comments

Comments
 (0)