distinctBase now is identity instead of error for non distinct types (#16891)

This commit is contained in:
Timothee Cour 2021-02-01 04:10:52 -08:00 • committed by GitHub
commit 1a74576854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 16 deletions

View file

@ -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