Skip to content

Commit

Permalink
Explain the issue and test in more detail
Browse files Browse the repository at this point in the history
  • Loading branch information
Clyybber committed Mar 12, 2024
1 parent 6a6c0a3 commit ae58d49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/lang_callable/macros/tmacros_various.nim
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,12 @@ block: # bug #15118
block:
flop("b")

block: # Ensure nkCommentStmt equality is not ignored when checking for const duplicates:
block:
# Ensure nkCommentStmt equality is not ignored when vmgen.cmpNodeCnst
# is used to deduplicate NimNode constants, so that `CommentStmt "comment 2"`
# is not counted as a duplicate of `CommentStmt "comment 1"` and
# incorrectly optimized to point at the `Comment "comment 1"` node

proc createComment(s: string): NimNode =
result = nnkCommentStmt.newNimNode()
result.strVal = s
Expand Down

0 comments on commit ae58d49

Please sign in to comment.