Skip to content

Commit

Permalink
initial test case for follow-on issue
Browse files Browse the repository at this point in the history
  • Loading branch information
saem committed Oct 31, 2023
1 parent 2de4216 commit bed752f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/lang_callable/overload/tfoo.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
discard """
"""

import std/strformat

echo fmt"{1}f"

#[
# attempting at creating a minimal failure case
proc main(n: SomeNumber) =
when n is SomeUnsignedInt:
var v = n.uint64
let negative = false
else:
let n = n.int64
let negative = n < 0
var v =
if negative:
# `uint64(-n)`, but accounts for `n == low(int64)`
uint64(not n) + 1
else:
uint64(n)
var w = typeof(v)(10)
doAssert v == w
main(10)
]#

0 comments on commit bed752f

Please sign in to comment.