* fixes #21023; Segfault when mixing seqs, orc, variants and futures * fixes none of the branches were explicitly selected * add one more test * one more test
This commit is contained in:
parent
72e262666b
commit
0319824322
3 changed files with 136 additions and 18 deletions
|
|
@ -559,6 +559,38 @@ template main {.dirty.} =
|
|||
let x = default(Default)
|
||||
doAssert x.data is DjangoDateTime
|
||||
|
||||
block:
|
||||
type
|
||||
Result2 = object
|
||||
case o: bool
|
||||
of false:
|
||||
e: float
|
||||
of true:
|
||||
v {.requiresInit.} : int = 1
|
||||
|
||||
proc startSessionSync(): Result2 =
|
||||
return Result2(o: true)
|
||||
|
||||
proc mainSync =
|
||||
let ff = startSessionSync()
|
||||
doAssert ff.v == 1
|
||||
|
||||
mainSync()
|
||||
|
||||
block:
|
||||
type
|
||||
Result2 = object
|
||||
v {.requiresInit.} : int = 1
|
||||
|
||||
proc startSessionSync(): Result2 =
|
||||
return Result2()
|
||||
|
||||
proc mainSync =
|
||||
let ff = startSessionSync()
|
||||
doAssert ff.v == 1
|
||||
|
||||
mainSync()
|
||||
|
||||
|
||||
static: main()
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue