summary refs log tree commit diff stats
path: root/tests/objects/tobject3.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objects/tobject3.nim')
-rw-r--r--tests/objects/tobject3.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/objects/tobject3.nim b/tests/objects/tobject3.nim
index bec2582fe..9ff1743ce 100644
--- a/tests/objects/tobject3.nim
+++ b/tests/objects/tobject3.nim
@@ -82,3 +82,14 @@ proc newArrayAnimationSampler*[T](): ArrayAnimationSampler[T] =
 
 discard newArrayAnimationSampler[Foo6]()
 discard newArrayAnimationSampler[AnotherFoo]()
+
+type
+  DefaultIsNone* = pointer | ptr | ref | proc {.nimcall.} | cstring | cstringArray
+  OptionKind* {.pure.} = enum None, Some
+  OptionA* [T] = object of RootObj
+    when T is DefaultIsNone:
+      value: T
+    else:
+      value: T
+      kind: OptionKind
+  SomeA* [T] = object of OptionA[T]