summary refs log tree commit diff stats
path: root/tests/generics/tforwardgeneric.nim
blob: c5943b9664c90415f3ced103de6130385324da20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
discard """
  output: "1.1000000000000001e+00 11"
  ccodecheck: "!@'ClEnv'"
"""

proc p[T](a, b: T): T

echo p(0.9, 0.1), " ", p(9, 1)

proc p[T](a, b: T): T =
  let c = b
  result = a + b + c