Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2022

Conversation

ringabout
Copy link
Member

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 ringabout self-assigned this Aug 5, 2022
@Araq
Copy link
Member

Araq commented Sep 2, 2022

Please explain the problem and your solution more.

@Varriount Varriount requested a review from Araq September 11, 2022 20:55
@Varriount Varriount added the Requires Araq To Merge PR should only be merged by Araq label Sep 11, 2022
@Varriount Varriount merged commit 37b3f62 into devel Sep 11, 2022
@Varriount Varriount deleted the pr_orc_generic branch September 11, 2022 20:55
@Varriount Varriount restored the pr_orc_generic branch September 11, 2022 20:55
Varriount added a commit that referenced this pull request Sep 11, 2022
Varriount added a commit that referenced this pull request Sep 11, 2022
…RC" (#20334)

Revert "fixes #20155; repr range with distinct types is broken with ORC (#20158)"

This reverts commit 37b3f62.
@Varriount
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

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

@ringabout
Copy link
Member Author

@Varriount, sure

capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
…RC (nim-lang#20158)

* fixes nim-lang#20155; repr range with distinct types is broken with ORC

* skipRanges
capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
…n with ORC" (nim-lang#20334)

Revert "fixes nim-lang#20155; repr range with distinct types is broken with ORC (nim-lang#20158)"

This reverts commit 37b3f62.
@ringabout ringabout deleted the pr_orc_generic branch April 17, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Requires Araq To Merge PR should only be merged by Araq
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repr complex generics with distinct reaches call depth limit with ARC/ORC
3 participants