Hrm, the new errors highlighted some code that seems to be broken

New issue: since `Table[A, B]` allocates its backing storage with
`newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table
with `not nil` types used as either keys or values.
This commit is contained in:
Zahary Karadjov 2020-03-29 02:17:47 +02:00 • committed by Andreas Rumpf
commit 0521f98486
8 changed files with 23 additions and 22 deletions

View file

@ -80,7 +80,7 @@ block thashes:
# Test with range
block:
type
R = range[1..10]
R = range[0..9]
var t = initTable[R,int]() # causes warning, why?
t[1] = 42 # causes warning, why?
t[2] = t[1] + 1