Created
February 13, 2015 02:37
-
-
Save triplefox/a400a11fe05566bdc0fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Thing = ref object | |
x* : float | |
var t0 : Thing; new(t0); | |
var r0 : ref float = cast[ref float](addr(t0.x)) | |
t0.x = 10.0 | |
doAssert(r0[] == 10.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment