Skip to content

Commit

Permalink
use distinct string
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Feb 11, 2020
1 parent 5692561 commit 3591954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/pure/typetraits.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export system.`$` # for backward compatibility

include "system/inclrtl"

proc getTypeid*(t: typedesc): string {.magic: "TypeTrait", since: (1, 1).} =
type
Typeid* = distinct string ## opaque, used by `getTypeid`
proc getTypeid*(t: typedesc): Typeid {.magic: "TypeTrait", since: (1, 1).} =
## returns a unique string id representing a type; the id is stable across
## recompilations of the same program, but may differ if the program source
## changes.
Expand Down

0 comments on commit 3591954

Please sign in to comment.