From b82ae33b903e309140fd471eee2de4c8ac7c0b46 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 1 Nov 2016 09:39:01 -0700 Subject: [PATCH] cmd/compile: add debug print to identify unexpected objects 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 Reviewed-by: Alan Donovan --- src/go/types/call.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/go/types/call.go b/src/go/types/call.go index 37595985a5..0d1fb34bce 100644 --- a/src/go/types/call.go +++ b/src/go/types/call.go @@ -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 -- 2.48.1