diff --git a/go/types/expr.go b/go/types/expr.go index 93a20140..db45b03c 100644 --- a/go/types/expr.go +++ b/go/types/expr.go @@ -7,6 +7,7 @@ package types import ( + "fmt" "go/ast" "go/token" "math" @@ -1386,10 +1387,7 @@ func (check *checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind { // types, which are comparatively rare. default: - if debug { - check.dump("expr = %v (%T)", e, e) - } - unreachable() + panic(fmt.Sprintf("%s: unknown expression type %T", check.fset.Position(e.Pos()), e)) } // everything went well