mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
19 lines
328 B
Nim
19 lines
328 B
Nim
type
|
|
Hello[T] = object
|
|
value: T
|
|
|
|
proc printHelloValue[T](hello: Hello[T]) =
|
|
echo hello.value
|
|
|
|
proc main() =
|
|
let a = Hello[float]()
|
|
p#[!]#rintHelloValue(a)
|
|
|
|
main()
|
|
|
|
discard """
|
|
$nimsuggest --tester $file
|
|
>def $1
|
|
def;;skProc;;tgenerics.printHelloValue;;proc (hello: Hello[printHelloValue.T]);;$file;;5;;5;;"";;100
|
|
"""
|