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

v2: temporary string cast fix

This commit is contained in:
Alexander Medvednikov 2020-02-16 12:36:00 +01:00
parent 6d8ad58515
commit 9eeb3dfe7e

View File

@ -573,7 +573,8 @@ pub fn (p mut Parser) name_expr() (ast.Expr,table.Type) {
mut expr := ast.Expr{}
expr,_ = p.expr(0)
// TODO, string(b, len)
if table.type_idx(to_typ) == table.string_type_idx && p.tok.kind == .comma {
// if table.type_idx(to_typ) == table.string_type_idx && p.tok.kind == .comma {
if p.tok.kind == .comma && name == 'string' {
p.check(.comma)
p.expr(0) // len
}