Skip to content
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

fix #16120 #16145

Merged
merged 1 commit into from Nov 26, 2020
Merged

fix #16120 #16145

merged 1 commit into from Nov 26, 2020

Conversation

cooldome
Copy link
Member

@cooldome cooldome commented Nov 26, 2020

The problem was that constant args never went through createTypeBoundOps, due to this line:

if getConstExpr(tracked.ownerModule, n, tracked.c.idgen, tracked.graph) != nil:
    return

Tha change is minimal, replaced:

if getConstExpr(tracked.ownerModule, n, tracked.c.idgen, tracked.graph) != nil:
  return

with

if getConstExpr(tracked.ownerModule, n, tracked.c.idgen, tracked.graph) == nil:
  ...

and moved ops in or out from this if statement, no changes to ops themselves.

@Clyybber Clyybber merged commit 8c12d3e into devel Nov 26, 2020
@Araq
Copy link
Member

Araq commented Nov 26, 2020

@narimiran Backport to 1.4 please.

@Araq Araq deleted the fix_16120 branch November 26, 2020 14:40
narimiran pushed a commit that referenced this pull request Nov 26, 2020
(cherry picked from commit 8c12d3e)
mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants