Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
newruntime - `t.destructor != nil` [AssertionError] with `toTable()` #11014
I extracted this minimal repro snippet from the tables module:
type KeyValuePairSeq[T] = seq[int] Table*[T] = object data: KeyValuePairSeq[T] proc initTable*[T](): Table[T] = discard proc enlarge() = var n: KeyValuePairSeq[int] #Replace this with discard and it works again var e = initTable[char]() #Remove this and it works again (doesn't matter if var e or let e) enlarge() #Also fails without calling enlarge
Whats interesting is, that upon removing the
And even more crazy:
Removing any of the generic parameters also makes this compile again.