@@ -273,8 +273,8 @@ func Jconv(n *Node, flag int) string {
273
273
fp += fmt .Sprintf (" isddd(%d)" , n .Isddd )
274
274
}
275
275
276
- if n .Implicit != 0 {
277
- fp += fmt .Sprintf (" implicit(%d )" , n .Implicit )
276
+ if n .Implicit {
277
+ fp += fmt .Sprintf (" implicit(%v )" , n .Implicit )
278
278
}
279
279
280
280
if n .Embedded != 0 {
@@ -289,8 +289,8 @@ func Jconv(n *Node, flag int) string {
289
289
fp += " assigned"
290
290
}
291
291
292
- if c == 0 && n .Used != 0 {
293
- fp += fmt .Sprintf (" used(%d )" , n .Used )
292
+ if c == 0 && n .Used {
293
+ fp += fmt .Sprintf (" used(%v )" , n .Used )
294
294
}
295
295
return fp
296
296
}
@@ -859,7 +859,7 @@ func stmtfmt(n *Node) string {
859
859
}
860
860
861
861
case OASOP :
862
- if n .Implicit != 0 {
862
+ if n .Implicit {
863
863
if n .Etype == OADD {
864
864
f += fmt .Sprintf ("%v++" , Nconv (n .Left , 0 ))
865
865
} else {
@@ -1109,7 +1109,7 @@ var opprec = []int{
1109
1109
}
1110
1110
1111
1111
func exprfmt (n * Node , prec int ) string {
1112
- for n != nil && n .Implicit != 0 && (n .Op == OIND || n .Op == OADDR ) {
1112
+ for n != nil && n .Implicit && (n .Op == OIND || n .Op == OADDR ) {
1113
1113
n = n .Left
1114
1114
}
1115
1115
@@ -1266,9 +1266,9 @@ func exprfmt(n *Node, prec int) string {
1266
1266
return f
1267
1267
1268
1268
case OCOMPLIT :
1269
- ptrlit := n .Right != nil && n .Right .Implicit != 0 && n .Right .Type != nil && Isptr [n .Right .Type .Etype ]
1269
+ ptrlit := n .Right != nil && n .Right .Implicit && n .Right .Type != nil && Isptr [n .Right .Type .Etype ]
1270
1270
if fmtmode == FErr {
1271
- if n .Right != nil && n .Right .Type != nil && n .Implicit == 0 {
1271
+ if n .Right != nil && n .Right .Type != nil && ! n .Implicit {
1272
1272
if ptrlit {
1273
1273
return fmt .Sprintf ("&%v literal" , Tconv (n .Right .Type .Type , 0 ))
1274
1274
} else {
@@ -1289,7 +1289,7 @@ func exprfmt(n *Node, prec int) string {
1289
1289
return f
1290
1290
1291
1291
case OPTRLIT :
1292
- if fmtmode == FExp && n .Left .Implicit != 0 {
1292
+ if fmtmode == FExp && n .Left .Implicit {
1293
1293
return fmt .Sprintf ("%v" , Nconv (n .Left , 0 ))
1294
1294
}
1295
1295
var f string
@@ -1299,7 +1299,7 @@ func exprfmt(n *Node, prec int) string {
1299
1299
case OSTRUCTLIT :
1300
1300
if fmtmode == FExp { // requires special handling of field names
1301
1301
var f string
1302
- if n .Implicit != 0 {
1302
+ if n .Implicit {
1303
1303
f += "{"
1304
1304
} else {
1305
1305
f += fmt .Sprintf ("(%v{" , Tconv (n .Type , 0 ))
@@ -1314,7 +1314,7 @@ func exprfmt(n *Node, prec int) string {
1314
1314
}
1315
1315
}
1316
1316
1317
- if n .Implicit == 0 {
1317
+ if ! n .Implicit {
1318
1318
f += "})"
1319
1319
return f
1320
1320
}
@@ -1330,7 +1330,7 @@ func exprfmt(n *Node, prec int) string {
1330
1330
if fmtmode == FErr {
1331
1331
return fmt .Sprintf ("%v literal" , Tconv (n .Type , 0 ))
1332
1332
}
1333
- if fmtmode == FExp && n .Implicit != 0 {
1333
+ if fmtmode == FExp && n .Implicit {
1334
1334
return fmt .Sprintf ("{ %v }" , Hconv (n .List , obj .FmtComma ))
1335
1335
}
1336
1336
var f string
0 commit comments