distinctBase now is identity instead of error for non distinct types (#16891)
This commit is contained in:
parent
25c75752d0
commit
1a74576854
4 changed files with 14 additions and 16 deletions
|
|
@ -90,6 +90,8 @@ block distinctBase:
|
|||
Foo[T] = distinct seq[T]
|
||||
var a: Foo[int]
|
||||
doAssert a.type.distinctBase is seq[int]
|
||||
doAssert seq[int].distinctBase is seq[int]
|
||||
doAssert "abc".distinctBase == "abc"
|
||||
|
||||
block:
|
||||
# simplified from https://github.com/nim-lang/Nim/pull/8531#issuecomment-410436458
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue