Improved type safety for memory writes
This commit is contained in:
@ -2,6 +2,6 @@ main() {
|
||||
writeToMemory(42)
|
||||
}
|
||||
|
||||
writeToMemory(p *any) {
|
||||
p[0] = 'A'
|
||||
writeToMemory(p *byte) {
|
||||
[p] = 'A'
|
||||
}
|
6
tests/errors/TypeMismatch6.q
Normal file
6
tests/errors/TypeMismatch6.q
Normal file
@ -0,0 +1,6 @@
|
||||
import mem
|
||||
|
||||
main() {
|
||||
a := mem.alloc(1)
|
||||
a[0] = int64(1)
|
||||
}
|
Reference in New Issue
Block a user