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

addr(object) doesn't work in VM #16020

Closed
timotheecour opened this issue Nov 17, 2020 · 0 comments · Fixed by #19902
Closed

addr(object) doesn't work in VM #16020

timotheecour opened this issue Nov 17, 2020 · 0 comments · Fixed by #19902
Labels
VM see also `const` label

Comments

@timotheecour
Copy link
Member

timotheecour commented Nov 17, 2020

addr(object) doesn't work in VM

Example

when true:
  type Foo = object
    f0: int
  proc main=
    var f = Foo(f0: 3)
    var f2 = f.addr
    f2[].f0 += 1
    f2.f0 += 1
    echo f
  static: main()
  main()

Current Output

--
(f0: 3)
--
(f0: 5)

Expected Output

--
(f0: 5)
--
(f0: 5)

Additional Information

@timotheecour timotheecour added the VM see also `const` label label Nov 17, 2020
ringabout added a commit that referenced this issue Jun 16, 2022
Araq pushed a commit that referenced this issue Jun 22, 2022
 (#19902) [backport]

* revert #12217 since the root problem seems to have been fixed; fix #15974;fix #12551; fix #19464

* fix #16020; fix #16780

* fix tests and #16613

* fix #14553

* fix #19909; skip skipRegisterAddr

* fix #18641
narimiran pushed a commit that referenced this issue Jun 23, 2022
 (#19902) [backport]

* revert #12217 since the root problem seems to have been fixed; fix #15974;fix #12551; fix #19464

* fix #16020; fix #16780

* fix tests and #16613

* fix #14553

* fix #19909; skip skipRegisterAddr

* fix #18641

(cherry picked from commit 3cb2d7a)
capocasa pushed a commit to capocasa/Nim that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VM see also `const` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant