-c49ddc84f3ce89310585aad23ab6e51ef5523748
+3d9ff9bc339942922f1be3bef07c6fe2978ad81a
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
// expression. It is a pointer to a struct whose first field points
// to the function code and whose remaining fields are the addresses
// of the closed-over variables.
- return this->closure_->get_backend(context);
+ Bexpression *bexpr = this->closure_->get_backend(context);
+
+ // Introduce a backend type conversion, to account for any differences
+ // between the argument type (function descriptor, struct with a
+ // single field) and the closure (struct with multiple fields).
+ Gogo* gogo = context->gogo();
+ Btype *btype = this->type()->get_backend(gogo);
+ return gogo->backend()->convert_expression(btype, bexpr, this->location());
}
// Ast dump for function.