parent
de70128fcc
commit
e0c1159fb3
2 changed files with 9 additions and 1 deletions
|
|
@ -1280,7 +1280,7 @@ proc genTypeInfo2Name(m: BModule; t: PType): Rope =
|
|||
var it = t
|
||||
while it != nil:
|
||||
it = it.skipTypes(skipPtrs)
|
||||
if it.sym != nil:
|
||||
if it.sym != nil and tfFromGeneric notin it.flags:
|
||||
var m = it.sym.owner
|
||||
while m != nil and m.kind != skModule: m = m.owner
|
||||
if m == nil or sfSystemModule in m.flags:
|
||||
|
|
|
|||
|
|
@ -160,3 +160,11 @@ proc main() =
|
|||
|
||||
main()
|
||||
|
||||
block: # bug #20391
|
||||
type Container[T] = ref object of RootRef
|
||||
item: T
|
||||
|
||||
let a = Container[int]()
|
||||
|
||||
doAssert a of Container[int]
|
||||
doAssert not (a of Container[string])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue