map_test.v: format + ref test
parent
af5b2e1b3c
commit
961e778ed1
|
@ -522,7 +522,7 @@ fn (p &Parser) find_type(name string) &Type {
|
|||
return typ
|
||||
}
|
||||
|
||||
fn (t &Table) find_type(name_ string) *Type {
|
||||
fn (t &Table) find_type(name_ string) &Type {
|
||||
mut name := name_
|
||||
if name.ends_with('*') && !name.contains(' ') {
|
||||
name = name.left(name.len - 1)
|
||||
|
|
|
@ -163,3 +163,14 @@ fn test_string_arr() {
|
|||
assert m['a'][0] == 'one'
|
||||
assert m['a'][1] == 'two'
|
||||
}
|
||||
|
||||
/*
|
||||
fn test_ref() {
|
||||
m := { 'one': 1 }
|
||||
// TODO "cannot take the address of m['one']"
|
||||
mut one := &m['one']
|
||||
one++
|
||||
println(*one)
|
||||
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue