Nim icon indicating copy to clipboard operation
Nim copied to clipboard

fixes #20155; repr range with distinct types is broken with ORC

Open ringabout opened this issue 1 year ago • 0 comments

fixes #20155; I tried my best and had to do some hacks with typetrait support to my knowledge.

template repr*(x: distinct): string will match range types with distinct subtypes. To repr the real distinct type, we need to skip the range types, otherwise it causes endless recursion.

ringabout avatar Aug 04 '22 14:08 ringabout

Please explain the problem and your solution more.

Araq avatar Sep 02 '22 10:09 Araq

@ringabout Sorry about this - I accidentally merged this PR. Could you make another one?

Varriount avatar Sep 11 '22 20:09 Varriount

Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 37b3f62eef16b0e7cb89e18f9ddc1fb96e17fb1b

Hint: mm: orc; threads: on; opt: speed; options: -d:release 164169 lines; 12.722s; 842.562MiB peakmem

github-actions[bot] avatar Sep 11 '22 21:09 github-actions[bot]

@Varriount, sure

ringabout avatar Sep 12 '22 03:09 ringabout