mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
fixes #24844
it may not be used in other places except in `genTraverseProc`,
we have to generate a `typedesc` for this case, not a weak `typedec`
(cherry picked from commit a77d1cc6c1)
This commit is contained in:
8
tests/refc/m24844.nim
Normal file
8
tests/refc/m24844.nim
Normal file
@@ -0,0 +1,8 @@
|
||||
type
|
||||
S*[T] = ref object of RootObj
|
||||
k: string
|
||||
A*[T] = ref object of S[T]
|
||||
|
||||
proc p*[T](): S[T] = S[T]()
|
||||
proc u*() = discard A[int]()
|
||||
discard A[int]()
|
||||
11
tests/refc/t24844.nim
Normal file
11
tests/refc/t24844.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
discard """
|
||||
matrix: "--mm:refc; --mm:arc"
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
import m24844
|
||||
|
||||
u()
|
||||
|
||||
type E = distinct int
|
||||
discard p[E]()
|
||||
Reference in New Issue
Block a user