mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
test: add tests for disallowing map/array get element/key address (#6568)
This commit is contained in:
@@ -182,17 +182,6 @@ fn test_delete() {
|
||||
println('two' in m) // => true, on Linux and Windows <-- wrong !
|
||||
}
|
||||
|
||||
/*
|
||||
fn test_ref() {
|
||||
m := { 'one': 1 }
|
||||
// TODO "cannot take the address of m['one']"
|
||||
mut one := &m['one']
|
||||
one++
|
||||
println(*one)
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
fn test_delete_size() {
|
||||
arr := ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
|
||||
mut m := map[string]int
|
||||
|
||||
Reference in New Issue
Block a user