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

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