checker: generic/vewb fix

pull/5237/head
joe-conigliaro 2020-06-06 17:06:11 +10:00
parent c1ccd56119
commit 0a3486b4c5
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1
1 changed files with 1 additions and 1 deletions

View File

@ -852,7 +852,7 @@ pub fn (mut c Checker) call_method(mut call_expr ast.CallExpr) table.Type {
}
if is_generic {
// We need the receiver to be T in cgen.
call_expr.receiver_type = table.t_type
call_expr.receiver_type = table.t_type.derive(method.args[0].typ)
} else {
call_expr.receiver_type = method.args[0].typ
}