mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 17:05:03 +01:00
add raw pointers
This commit is contained in:
parent
5bac67b84c
commit
64d81b5608
8 changed files with 101 additions and 29 deletions
13
ui-tests/raw_ptr.nil
Normal file
13
ui-tests/raw_ptr.nil
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
//@check-pass
|
||||
|
||||
type A = struct { a: Int };
|
||||
|
||||
function main() = (
|
||||
let a = A { a: 0 };
|
||||
rawr(___transmute(a));
|
||||
std.printInt(a.a);
|
||||
);
|
||||
|
||||
function rawr(a: *A) = (
|
||||
a.a = 1;
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue