fix when statements in inheritable generic objects (#13667) [backport]
This commit is contained in:
parent
122751aa52
commit
51bd442b88
2 changed files with 12 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue