mojo
mojo copied to clipboard
[BUG] Pointer is not working properly
Bug description
def main():
var v = 8
var ptr = Pointer[Int](v)
print(ptr)
Output
0x8
The location of the variable v was supposed to be printed in memory as 0x8ffed2bfe0b0, but it did not happen.
Steps to reproduce
- Include relevant code snippet or link to code that did not work as expected.
- If applicable, add screenshots to help explain the problem.
- If using the Playground, name the pre-existing notebook that failed and the steps that led to failure.
- Include anything else that might help us debug the issue.
System information
- What OS did you do install Mojo on ? https://docs.modular.com/mojo/playground
- Provide version information for Mojo by pasting the output of `mojo -v` 24.2
- Provide Modular CLI version by pasting the output of `modular -v`