v2: temporary string cast fix

pull/3752/head
Alexander Medvednikov 2020-02-16 12:36:00 +01:00
parent 6d8ad58515
commit 9eeb3dfe7e
1 changed files with 2 additions and 1 deletions

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
}