Skip to content

Commit

Permalink
rebase, add faithful test for nim-lang#19365
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 16, 2024
1 parent 935553f commit 6fa0c1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/vm/tgenericcompiletimeproc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ block: # issue #10753
block: # issue #22021
proc foo(x: static int): int {.compileTime.} = x + 1
doAssert foo(123) == 124

block: # issue #19365
proc f[T](x: static T): T {.compileTime.} = x + x
doAssert f(123) == 246
doAssert f(1.0) == 2.0

0 comments on commit 6fa0c1c

Please sign in to comment.