make privateAccess work with generic types and generic instantiations; fix a SIGSEGV (#18260)

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Timothee Cour 2021-06-19 11:24:46 -07:00 • committed by GitHub
commit 7714ab468a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 118 additions and 15 deletions

View file

@ -13,5 +13,20 @@ type
hd1: float
PA* = ref A
PtA* = ptr A
E*[T] = object
he1: int
FSub[T1, T2] = object
h3: T1
h4: T2
F*[T1, T2] = ref FSub[T1, T2]
G*[T] = ref E[T]
H3*[T] = object
h5: T
H2*[T] = H3[T]
H1*[T] = ref H2[T]
H*[T] = H1[T]
type BAalias* = typeof(B.default)
# typeof is not a transparent abstraction, creates a `tyAlias`
proc initB*(): B = B()