checker: temp map str() method fix

pull/4091/head
Joe Conigliaro 2020-03-21 22:31:25 +11:00
parent cc75fe4fe5
commit eb8d64999f
1 changed files with 1 additions and 0 deletions

View File

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