Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Apr 21, 2021
1 parent 7263616 commit b2af1f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pure/typetraits.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ proc getTypeId*(t: typedesc): TypeId {.since: (1, 1).} =
runnableExamples:
type Foo[T] = object
type Foo2 = Foo
doAssert Foo[int].getTypeId == Foo2[type(1)].getTypeId
doAssert Foo[int].getTypeId != Foo[float].getTypeId
assert Foo[int].getTypeId == Foo2[type(1)].getTypeId
assert Foo[int].getTypeId != Foo[float].getTypeId
TypeId(getTypeIdImpl(t))

proc name*(t: typedesc): string {.magic: "TypeTrait".}
proc name*(t: typedesc): string {.magic: "TypeTrait".} =
## Returns the name of the given type.
##
## Alias for `system.\`$\`(t) <dollars.html#$,typedesc>`_ since Nim v0.20.
Expand Down

0 comments on commit b2af1f1

Please sign in to comment.