compiler: preserve nointerface property when inlining methods
When an inline function (with body) is imported from another package,
make that the "nointerface" property (if set) is preserved.
Fixes golang/go#30862.
Change-Id: I8fca667b1373c066053463c0b9a9dcf3c2260d65
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167742
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/go/gogo.cc b/go/gogo.cc
index 757758e..a9630b2 100644
--- a/go/gogo.cc
+++ b/go/gogo.cc
@@ -6899,6 +6899,8 @@
if (fntype->is_method())
{
+ if (this->nointerface())
+ fn->set_nointerface();
const Typed_identifier* receiver = fntype->receiver();
Variable* recv_param = new Variable(receiver->type(), NULL, false,
true, true, start_loc);