Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 21, 2020
1 parent 5cd52c0 commit 3586daf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/system.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,6 @@ when defined(himHasOverloadResolve):
## without calling it. Unlike `compiles(foo(args))`, the body is not analyzed.
## Also works with `compiles(mymod.mysym)` to return the symChoice overload
## set.
discard

when defined(nimV2):
import system/repr_v2
Expand Down
3 changes: 2 additions & 1 deletion tests/magics/mresolves.nim
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ macro inspect*(a: typed, resolveLet: static bool = false): untyped =
s.add a.lineInfoObj.toStr & ": "
s.add a.repr & " = "
inspectImpl(s, a, resolveLet)
echo s
when defined(nimTestsResolvesDebug):
echo s
10 changes: 9 additions & 1 deletion tests/magics/tresolve_overloads.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#[
D20190825T173945
use -d:nimTestsResolvesDebug to make the `inspect` macro print debug info showing
resolved symbol locations, for example:
`inspect resolveSymbol(`$`)` would print:
Nim/tests/magics/tresolve_overloads.nim:133:28: $ = closedSymChoice:
Nim/lib/system/dollars.nim:124:1 proc `$`[T](x: set[T]): string
Nim/lib/system/dollars.nim:140:1 proc `$`[T; U](x: HSlice[T, U]): string
Nim/lib/system/dollars.nim:14:1 proc `$`(x: bool): string {.magic: "BoolToStr", noSideEffect.}
]#

import ./mresolves
Expand Down

0 comments on commit 3586daf

Please sign in to comment.