summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-05-02 10:03:50 -0600
committerTianon Gravi <admwiggin@gmail.com>2015-05-02 10:03:50 -0600
commit900a90fa45bc1ef792101287b5c997c287c7f88b (patch)
tree2be89b4956247b3354c8f7f51269621beb5684be /src/cmd/gc/subr.c
parentf913cbd2a32ec6764e4b7be9c8a300322459a9c2 (diff)
parent839657a730bd3c82d1b7932f996dd87448eb7d38 (diff)
downloadgolang-900a90fa45bc1ef792101287b5c997c287c7f88b.tar.gz
Merge tag 'upstream/1.4.2' into debian-sid
* tag 'upstream/1.4.2': Imported Upstream version 1.4.2
Diffstat (limited to 'src/cmd/gc/subr.c')
-rw-r--r--src/cmd/gc/subr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index c3bc5af3b..26153d39b 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -2614,7 +2614,16 @@ genwrapper(Type *rcvr, Type *method, Sym *newnam, int iface)
fn->dupok = 1;
typecheck(&fn, Etop);
typechecklist(fn->nbody, Etop);
+
+ // Set inl_nonlocal to whether we are calling a method on a
+ // type defined in a different package. Checked in inlvar.
+ if(!methodrcvr->local)
+ inl_nonlocal = 1;
+
inlcalls(fn);
+
+ inl_nonlocal = 0;
+
curfn = nil;
funccompile(fn, 0);
}