summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
committerTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
commit839657a730bd3c82d1b7932f996dd87448eb7d38 (patch)
treed46006c2df507ba8cfd57a47169d326349b5c749 /src/cmd/gc/subr.c
parent90ad8a7e5881be7834909c649f994b6b5244c965 (diff)
downloadgolang-upstream-sid.tar.gz
Imported Upstream version 1.4.2upstream/1.4.2upstream-sid
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);
}