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

checker: temp map str() method fix

This commit is contained in:
Joe Conigliaro 2020-03-21 22:31:25 +11:00
parent cc75fe4fe5
commit eb8d64999f

View File

@ -333,6 +333,7 @@ pub fn (c mut Checker) method_call_expr(method_call_expr mut ast.MethodCallExpr)
}
// TODO: str methods
if typ_sym.kind in [.map] && name == 'str' {
method_call_expr.receiver_type = typ
method_call_expr.return_type = table.string_type
return table.string_type
}