return f
case OLITERAL: // this is a bit of a mess
- if n.Orig != nil && n.Orig != n {
- return exprfmt(n.Orig, prec)
+ if fmtmode == FErr {
+ if n.Orig != nil && n.Orig != n {
+ return exprfmt(n.Orig, prec)
+ }
+ if n.Sym != nil {
+ return fmt.Sprintf("%v", Sconv(n.Sym, 0))
+ }
}
- if fmtmode == FErr && n.Sym != nil {
- return fmt.Sprintf("%v", Sconv(n.Sym, 0))
+ if n.Val.Ctype == CTNIL && n.Orig != nil && n.Orig != n {
+ return exprfmt(n.Orig, prec)
}
if n.Type != nil && n.Type != Types[n.Type.Etype] && n.Type != idealbool && n.Type != idealstring {
// Need parens when type begins with what might
--- /dev/null
+// compiledir
+
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 10066: constants are printed in the original form
+// in export data. This is the opposite of issue 9076.
+
+package ignored