]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add debug print to identify unexpected objects
authorRobert Griesemer <gri@golang.org>
Tue, 1 Nov 2016 16:39:01 +0000 (09:39 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 1 Nov 2016 16:49:30 +0000 (16:49 +0000)
This should never be called but should help identify causes of
unexpected panics such as in issue #17716.

Change-Id: Id6ad0cef1088a41bfcc69110a93484a7e39c4128
Reviewed-on: https://go-review.googlesource.com/32480
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/call.go

index 37595985a5e872d555455211c176ac61e7d3736a..0d1fb34bce5c81b9ddf7581e40549169eb04020d 100644 (file)
@@ -318,6 +318,7 @@ func (check *Checker) selector(x *operand, e *ast.SelectorExpr) {
                                x.typ = exp.typ
                                x.id = exp.id
                        default:
+                               check.dump("unexpected object %v (%T)", exp, exp)
                                unreachable()
                        }
                        x.expr = e