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

wrong variable substitution in conditional assignment with refc GC #18342

Open
hamidb80 opened this issue Jun 24, 2021 · 1 comment
Open

wrong variable substitution in conditional assignment with refc GC #18342

hamidb80 opened this issue Jun 24, 2021 · 1 comment

Comments

@hamidb80
Copy link
Contributor

Example

block correct:
  var point = (x: 10, y: 4)

  point = (x: point.y, y: - point.x)
  echo point

block wrong:
  var point = (x: 10, y: 4)

  point = 
    if true: (x: point.y, y: - point.x)
    else: point

  echo point

Current Output

(x: 4, y: -10)
(x: 4, y: -4)

Expected Output

(x: 4, y: -10)
(x: 4, y: -10)

Additional Information

$ nim -v
Nim Compiler Version 1.5.1 [Windows: amd64]
Compiled at 2021-06-20
Copyright (c) 2006-2021 by Andreas Rumpf
@hamidb80 hamidb80 changed the title wrong variable substitution in conditional assignment wrong variable substitution in conditional assignment with default GC Jun 24, 2021
@hamidb80
Copy link
Contributor Author

it does work for ARC and ORC but not other GCs

@ringabout ringabout added the refc refc issues label Jan 25, 2022
@hamidb80 hamidb80 changed the title wrong variable substitution in conditional assignment with default GC wrong variable substitution in conditional assignment with refc GC Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants