public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Don't look for methods on named pointer types
@ 2011-03-03  3:31 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-03-03  3:31 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Methods are not permitted on named pointer types, so there is no reason
to look for them there.  This patch changes the Go frontend to not do
that.  Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 521 bytes --]

diff -r e71cf771cab1 go/types.cc
--- a/go/types.cc	Wed Mar 02 18:06:48 2011 -0800
+++ b/go/types.cc	Wed Mar 02 19:30:05 2011 -0800
@@ -7963,9 +7963,7 @@
   if (type->deref()->is_error_type())
     return Expression::make_error(location);
 
-  const Named_type* nt = type->named_type();
-  if (nt == NULL)
-    nt = type->deref()->named_type();
+  const Named_type* nt = type->deref()->named_type();
   const Struct_type* st = type->deref()->struct_type();
   const Interface_type* it = type->deref()->interface_type();
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-03  3:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03  3:31 Go patch committed: Don't look for methods on named pointer types Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).