diff options
author | Tianon Gravi <admwiggin@gmail.com> | 2015-05-02 10:02:54 -0600 |
---|---|---|
committer | Tianon Gravi <admwiggin@gmail.com> | 2015-05-02 10:02:54 -0600 |
commit | 839657a730bd3c82d1b7932f996dd87448eb7d38 (patch) | |
tree | d46006c2df507ba8cfd57a47169d326349b5c749 /src/cmd/gc/subr.c | |
parent | 90ad8a7e5881be7834909c649f994b6b5244c965 (diff) | |
download | golang-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.c | 9 |
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); } |