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.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/objects/tobject3.nim b/tests/objects/tobject3.nim
index 0a3df02ea..9ff1743ce 100644
--- a/tests/objects/tobject3.nim
+++ b/tests/objects/tobject3.nim
@@ -4,7 +4,7 @@ TFoo
 '''
 """
 
-## XXX this output needs to be adapated for VCC which produces different results.
+## XXX this output needs to be adapted for VCC which produces different results.
 
 # It turned out that it's hard to generate correct for these two test cases at
 # the same time.
@@ -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]