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

Returning a 'var T' is not always safe #124

Closed
Araq opened this issue May 28, 2012 · 1 comment
Closed

Returning a 'var T' is not always safe #124

Araq opened this issue May 28, 2012 · 1 comment

Comments

@Araq
Copy link
Member

Araq commented May 28, 2012

Returning a 'var T' does not mean it is save to return it:

  proc forward[T](x: var T): var T = result = x
  proc p(): var int = 
    var x: int
    # reject this call via alias analysis:
    result = forward(x)
@Araq
Copy link
Member Author

Araq commented Apr 21, 2018

This has now been fixed. RFC still open because it needs manual / documentation additions.

@Araq Araq closed this as completed Apr 21, 2018
krux02 pushed a commit to krux02/Nim that referenced this issue Jan 11, 2022
124: store extra metadata in release archives r=alaviss a=alaviss

This allows koch to fill in commit/commit date data when compiling the compiler from a source archive.

A prerequisite for nightlies.

We are getting deep into the `niminst` is compiler-only territory with this. I hope that in the future I can make nim-lang#123 happen and consolidate everything into koch.

Co-authored-by: Leorize <leorize+oss@disroot.org>
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