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:
@ -573,7 +573,8 @@ pub fn (p mut Parser) name_expr() (ast.Expr,table.Type) {
|
|||||||
mut expr := ast.Expr{}
|
mut expr := ast.Expr{}
|
||||||
expr,_ = p.expr(0)
|
expr,_ = p.expr(0)
|
||||||
// TODO, string(b, len)
|
// 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.check(.comma)
|
||||||
p.expr(0) // len
|
p.expr(0) // len
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user