This commit is contained in:
Andreas Rumpf 2016-07-18 12:16:54 +02:00
commit d779a9b722
2 changed files with 49 additions and 9 deletions

View file

@ -0,0 +1,19 @@
discard """
errormsg: "type mismatch: got (FooRef[system.string])"
line: 15
"""
# bug #4478
type
Foo[T] = object
FooRef[T] = ref Foo[T]
proc takeFoo[T](foo: Foo[T]): int = discard
proc g(x: FooRef[string]) =
echo x.takeFoo() != 8
var x: FooRef[string]
g(x)