No longer segfault when using a typeclass with a self referencing type (#19467)
This commit is contained in:
parent
22ae0bef63
commit
1830a3b505
2 changed files with 14 additions and 1 deletions
|
|
@ -860,3 +860,15 @@ type
|
|||
|
||||
var a: Tile3[int]
|
||||
|
||||
block: # Ensure no segfault from constraint
|
||||
type
|
||||
Regex[A: SomeOrdinal] = ref object
|
||||
val: Regex[A]
|
||||
MyConstraint = (seq or enum or set)
|
||||
MyOtherType[A: MyConstraint] = ref object
|
||||
val: MyOtherType[A]
|
||||
|
||||
var
|
||||
a = Regex[int]()
|
||||
b = Regex[bool]()
|
||||
c = MyOtherType[seq[int]]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue