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

string: make index() return ?int instead of int/-1

This commit is contained in:
Alexander Medvednikov
2019-11-30 13:09:05 +03:00
parent cc2bd0bb68
commit 81d4f66fbb
11 changed files with 117 additions and 103 deletions

View File

@@ -157,8 +157,10 @@ fn (p mut Parser) get_type2() Type {
typ = 'Option_$typ'
p.table.register_type_with_parent(typ, 'Option')
}
/*
if typ.last_index('__') > typ.index('__') {
p.error('2 __ in gettype(): typ="$typ"')
}
*/
return Type{name: typ, cat: cat}
}