1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

bare: fix str[idx]

This commit is contained in:
Alexander Medvednikov 2019-11-16 11:33:04 +03:00
parent a545ccb740
commit dc50ed69cf
2 changed files with 5 additions and 1 deletions

View File

@ -7,3 +7,7 @@ pub fn panic(s string) {
//write(1, s.str, s.len)
}
pub fn panic_debug(s string) {
//write(1, s.str, s.len)
}

View File

@ -211,7 +211,7 @@ fn (p mut Parser) index_get(typ string, fn_ph int, cfg IndexConfig) {
}
}
}
else if cfg.is_str && !p.builtin_mod {
else if cfg.is_str && !p.builtin_mod && !p.pref.is_bare {
if cfg.is_slice {
p.gen('string_substr2($index_expr)')
} else {