This commit is contained in:
Andreas Rumpf 2019-05-15 08:18:20 +02:00 • committed by GitHub
commit 95f8ed0382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,21 @@
discard """
errormsg: "type mismatch: got <TT[seq[string]], proc (v: int){.gcsafe, locks: 0.}>"
line: 20
"""
# bug #6732
import typetraits
type
TT[T] = ref object of RootObj
val: T
CB[T] = proc (v: T)
proc testGeneric[T](val: TT[T], cb: CB[T]) =
echo val.type.name
echo $val.val
var tt = new(TT[seq[string]])
echo tt.type.name
tt.testGeneric( proc (v: int) =
echo $v )