Skip to content

Commit

Permalink
Merge #231
Browse files Browse the repository at this point in the history
231: Replace all localReport errors with nkError in pragmas.nim r=Clyybber a=Clyybber

## Summary
Convert all localReport calls used for errors in pragmas.nim
to  nkError/newError.
Also adds tests for invalid asm statements in invalidasmstmt.nim and a invalid pragma expression test to invalidpragma.nim.

Co-authored-by: Clyybber <[email protected]>
  • Loading branch information
bors[bot] and Clyybber authored Feb 11, 2022
2 parents 3e81e76 + 16573f6 commit 2e3f302
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 90 deletions.
1 change: 0 additions & 1 deletion compiler/ast/report_enums.nim
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ type
# Pragma
rsemInvalidPragma
## suplied pragma is invalid
rsemCannotAttachPragma
rsemUnexpectedPragma
rsemPropositionExpected
rsemIllegalCustomPragma
Expand Down
3 changes: 0 additions & 3 deletions compiler/front/cli_reporter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2156,9 +2156,6 @@ proc reportBody*(conf: ConfigRef, r: SemReport): string =
of rsemUnexpectedPragma:
result = "unexpected pragma"

of rsemCannotAttachPragma:
result = "cannot attach a custom pragma to '" & r.symstr & "'"

of rsemDisallowedReprForNewruntime:
result = "'repr' is not available for --newruntime"

Expand Down
Loading

0 comments on commit 2e3f302

Please sign in to comment.