Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 committed Feb 12, 2020
1 parent be01cbf commit a8fe648
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
- Added `minIndex` and `maxIndex` to the `sequtils` module
- Added `os.isRelativeTo` to tell whether a path is relative to another
- Added `resetOutputFormatters` to `unittest`

- Added a new generic overload of `newLit` for distinct types in `macros`

## Library changes

Expand Down
2 changes: 1 addition & 1 deletion lib/core/macros.nim
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ macro undistinct[T: distinct](arg: T): untyped =
let baseTyp = getTypeImpl(arg)[0]
result = newCall(baseTyp, arg)

proc newLit*[T : distinct](arg: T): NimNode {.compileTime.} =
proc newLit*[T : distinct](arg: T): NimNode {.compileTime, since: (1,1).} =
result = newCall(bindSym"T", newLit(undistinct(arg)))

proc nestList*(op: NimNode; pack: NimNode): NimNode {.compileTime.} =
Expand Down

0 comments on commit a8fe648

Please sign in to comment.