Patchwork Go patch committed: Don't get confused by error types in traversal

mail settings
Submitter Ian Taylor
Date Dec. 15, 2010, 1:05 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/75592/
State New
Headers show


Ian Taylor - Dec. 15, 2010, 1:05 a.m.
This patch fixes the Go frontend to not get confused by error types when
doing a traversal.  Previously once an error type had been seen, the
frontend would think that all subsequent types had been seen, because to
avoid knock-on type compatibility error messages the error type is
considered to be identical to all other types.  Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.



diff -r 8c9b70be1f8c go/
--- a/go/	Tue Dec 14 16:08:09 2010 -0800
+++ b/go/	Tue Dec 14 17:00:35 2010 -0800
@@ -4201,6 +4201,8 @@ 
 Traverse::remember_type(const Type* type)
+  if (type->is_error_type())
+    return true;
   gcc_assert((this->traverse_mask() & traverse_types) != 0
 	     || (this->traverse_mask() & traverse_expressions) != 0);
   // We only have to remember named types, as they are the only ones