set[T].len is an alias for set[T].card (#11885) [feature]

This commit is contained in:
Andy Davidoff 2019-08-05 08:27:45 -04:00 • committed by Andreas Rumpf
commit d208d7a995
2 changed files with 7 additions and 0 deletions

View file

@ -207,6 +207,10 @@ echo warnUninit in gNotes
doAssert {-1.int8, -2, -2}.card == 2
doAssert {1, 2, 2, 3..5, 4..6}.card == 6
# merely test the alias
doAssert {-1.int8, -2, -2}.len == 2
doAssert {1, 2, 2, 3..5, 4..6}.len == 6
type Foo = enum
Foo1 = 0
Foo2 = 1