summary refs log tree commit diff stats
path: root/tests/stdlib/mimportutils.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-06-19 11:24:46 -0700
committerGitHub <noreply@github.com>2021-06-19 11:24:46 -0700
commit7714ab468a665e772c6d37d39038974cbcea75dc (patch)
tree3e55551784b56c975d22c3c307301b4abca68110 /tests/stdlib/mimportutils.nim
parent5d15bd7b618cda06e3ae88883914467f89d38112 (diff)
downloadNim-7714ab468a665e772c6d37d39038974cbcea75dc.tar.gz
make privateAccess work with generic types and generic instantiations; fix a SIGSEGV (#18260)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/stdlib/mimportutils.nim')
-rw-r--r--tests/stdlib/mimportutils.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/stdlib/mimportutils.nim b/tests/stdlib/mimportutils.nim
index d2b185cd3..e89d58d27 100644
--- a/tests/stdlib/mimportutils.nim
+++ b/tests/stdlib/mimportutils.nim
@@ -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()