typeToString can now show (recursively) resolved type aliases; fixes #8569 #8083 #8570 (#11678)

* nested typeToString
* typeToString: preferResolved
* add test
* fix test
* preferMixed
* fix tests
This commit is contained in:
Timothee Cour 2019-08-30 23:26:45 -07:00 • committed by Andreas Rumpf
commit 9ae0dd611f
6 changed files with 272 additions and 203 deletions

View file

@ -36,7 +36,7 @@ tsigmatch.nim(143, 13) Error: type mismatch: got <array[0..0, proc (x: int){.gcs
but expected one of:
proc takesFuncs(fs: openArray[proc (x: int) {.gcsafe, locks: 0.}])
first type mismatch at position: 1
required type for fs: openarray[proc (x: int){.closure, gcsafe, locks: 0.}]
required type for fs: openArray[proc (x: int){.closure, gcsafe, locks: 0.}]
but expression '[proc (x: int) {.gcsafe, locks: 0.} = echo [x]]' is of type: array[0..0, proc (x: int){.gcsafe, locks: 0.}]
expression: takesFuncs([proc (x: int) {.gcsafe, locks: 0.} = echo [x]])