Skip to content

Commit

Permalink
cmd/compile: add debug print to identify unexpected objects
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer committed Nov 1, 2016
1 parent 719b493 commit b82ae33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/go/types/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b82ae33

Please sign in to comment.