typetraits.$: $((int, float), int) is now "((int, float), int)" instead of "(tuple of (int, float), int)" (#14812)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
parent
dc5a40f3f3
commit
a6cbe58e8c
6 changed files with 11 additions and 12 deletions
|
|
@ -52,10 +52,8 @@ block: # name, `$`
|
|||
doAssert $tuple[] == "tuple[]"
|
||||
doAssert $(int,) == "(int,)"
|
||||
doAssert $(int, float) == "(int, float)"
|
||||
doAssert $((int), tuple[], tuple[a: uint], tuple[a: uint, b: float], (int,), (int, float)) == "(int, tuple[], tuple[a: uint], tuple[a: uint, b: float], tuple of (int,), tuple of (int, float))"
|
||||
# xxx this is inconsistent, it should be:
|
||||
# "(int, tuple[], tuple[a: uint], tuple[a: uint, b: float], (int,), (int, float))"
|
||||
# which matches how you write it, is consistent with `$(int,)`, and is un-ambiguous.
|
||||
doAssert $((int), tuple[], tuple[a: uint], tuple[a: uint, b: float], (int,), (int, float)) ==
|
||||
"(int, tuple[], tuple[a: uint], tuple[a: uint, b: float], (int,), (int, float))"
|
||||
|
||||
block: # typeToString
|
||||
type MyInt = int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue