parent
69cabaa81c
commit
a7cae2bda2
2 changed files with 21 additions and 2 deletions
20
tests/overload/tproc_types_dont_like_subtypes.nim
Normal file
20
tests/overload/tproc_types_dont_like_subtypes.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
discard """
|
||||
errormsg: "got <B, proc (b: B){.closure, gcsafe, locks: 0.}>"
|
||||
line: 20
|
||||
"""
|
||||
|
||||
type
|
||||
A = ref object of RootObj
|
||||
B = ref object of A
|
||||
|
||||
P = proc (a: A)
|
||||
|
||||
# bug #16325
|
||||
|
||||
proc doThings(a: A, p: P) =
|
||||
p(a)
|
||||
|
||||
var x = proc (b: B) {.closure.} =
|
||||
echo "B"
|
||||
|
||||
doThings(B(), x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue