-
-
Save dom96/eb7ed68cbca07175bafc to your computer and use it in GitHub Desktop.
This file contains 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 | |
Foo = object | |
x: ref seq[int] | |
var f = Foo() | |
new(f.x) | |
echo(f.repr) | |
f.x[] = @[] | |
echo(f.repr) | |
f.x[].add(42) | |
echo(f.repr) |
This file contains 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
[x = ref 0x10ab1d050 --> nil] | |
[x = ref 0x10ab1d050 --> 0x10ab1e050[]] | |
[x = ref 0x10ab1d050 --> 0x10ab26050[42]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment