Skip to content

Commit

Permalink
move example where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Jul 19, 2024
1 parent b859830 commit a408209
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/after/procs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,7 @@ proc exact89charswithequals(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: int
) =
discard

check not (compiles do:
result:
int8 = 6)
26 changes: 26 additions & 0 deletions tests/after/procs.nim.nph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,3 +1099,29 @@ sons:
- kind: "nkDiscardStmt"
sons:
- kind: "nkEmpty"
- kind: "nkCommand"
sons:
- kind: "nkIdent"
ident: "check"
- kind: "nkPrefix"
sons:
- kind: "nkIdent"
ident: "not"
- kind: "nkCall"
sons:
- kind: "nkIdent"
ident: "compiles"
- kind: "nkStmtList"
sons:
- kind: "nkCall"
sons:
- kind: "nkIdent"
ident: "result"
- kind: "nkStmtList"
sons:
- kind: "nkAsgn"
sons:
- kind: "nkIdent"
ident: "int8"
- kind: "nkIntLit"
intVal: 6
5 changes: 4 additions & 1 deletion tests/before/procs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ proc `[`() = discard


proc exact88charswithequals(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: int) = discard
proc exact89charswithequals(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: int) = discard
proc exact89charswithequals(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: int) = discard

check not (compiles do:
result: int8 = 6)
26 changes: 26 additions & 0 deletions tests/before/procs.nim.nph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,3 +1099,29 @@ sons:
- kind: "nkDiscardStmt"
sons:
- kind: "nkEmpty"
- kind: "nkCommand"
sons:
- kind: "nkIdent"
ident: "check"
- kind: "nkPrefix"
sons:
- kind: "nkIdent"
ident: "not"
- kind: "nkCall"
sons:
- kind: "nkIdent"
ident: "compiles"
- kind: "nkStmtList"
sons:
- kind: "nkCall"
sons:
- kind: "nkIdent"
ident: "result"
- kind: "nkStmtList"
sons:
- kind: "nkAsgn"
sons:
- kind: "nkIdent"
ident: "int8"
- kind: "nkIntLit"
intVal: 6

0 comments on commit a408209

Please sign in to comment.