Improved type safety for memory writes

This commit is contained in:
2025-04-14 15:58:15 +02:00
parent 43a006e4af
commit 6483573923
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)
}