Improved type safety for memory writes

This commit is contained in:
Eduard Urbach 2025-04-14 15:58:15 +02:00
parent 3da61f5c69
commit fb19ee2373
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 54 additions and 51 deletions

View file

@ -2,6 +2,6 @@ main() {
writeToMemory(42)
}
writeToMemory(p *any) {
p[0] = 'A'
writeToMemory(p *byte) {
[p] = 'A'
}

View file

@ -0,0 +1,6 @@
import mem
main() {
a := mem.alloc(1)
a[0] = int64(1)
}