lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Punctuation error and word-usage error in LPython error message

Open rebcabin opened this issue 1 year ago • 4 comments

(lp) ┌─(~/Documents/GitHub/lpython/integration_tests)────(brian@MacBook-Pro:s001)─┐
└─(12:16:55 on vector-backend ✹ ✭)──> lpython ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py                                              2 ↵ ──(Tue,Feb06)─┘
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
  --> ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py:18:15
   |
18 |     A_nm: i16[n, m] = empty((n, m), dtype=int16)
   |               ^ 

"compile time" must be hyphenated: "compile-time" (reference: Grammarly.com plugin or Gregg Reference Manual, any edition, chapter 8).

(lp) ┌─(~/Documents/GitHub/lpython/integration_tests)────(brian@MacBook-Pro:s001)─┐
└─(12:16:55 on vector-backend ✹ ✭)──> lpython ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py                                              2 ↵ ──(Tue,Feb06)─┘
semantic error: Only those local variables which can be reduced to compile-time constant should be used in dimensions of an array.
  --> ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py:18:15
   |
18 |     A_nm: i16[n, m] = empty((n, m), dtype=int16)
   |               ^ 

also, "which can" must be "that can" in American English (reference: Grammarly.com plugin)

(lp) ┌─(~/Documents/GitHub/lpython/integration_tests)────(brian@MacBook-Pro:s001)─┐
└─(12:16:55 on vector-backend ✹ ✭)──> lpython ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py                                              2 ↵ ──(Tue,Feb06)─┘
semantic error: Only those local variables that can be reduced to compile-time constant should be used in dimensions of an array.
  --> ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2492.py:18:15
   |
18 |     A_nm: i16[n, m] = empty((n, m), dtype=int16)
   |               ^ 

rebcabin avatar Feb 06 '24 20:02 rebcabin

Another one (Grammarly missed this!)

"constant" should be plural "constants"

Only those local variables that can be reduced to compile-time constants should be used in dimensions of an array.

rebcabin avatar Feb 06 '24 20:02 rebcabin

worked on it and opened a PR

rudhrabehara avatar Feb 08 '24 16:02 rudhrabehara

please review and give suggestions

rudhrabehara avatar Feb 08 '24 16:02 rudhrabehara

@Shaikh-Ubaid This issue can be closed with reference to the above merged PR.

kmr-srbh avatar Mar 19 '24 02:03 kmr-srbh