mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Clarify a method TypeExpr's string form
This commit is contained in:
1 parent
7c7ca4c723
commit
bbe3eef04b
1 file changed
+5
-2
+5
-2
@@ -225,8 +225,11 @@ func (n *TypeExpr) appendStr(buf []byte, tm *t.Map, depth uint32) []byte {
|
|||||||
return n.Inner().appendStr(buf, tm, depth)
|
return n.Inner().appendStr(buf, tm, depth)
|
||||||
case t.IDOpenParen:
|
case t.IDOpenParen:
|
||||||
buf = append(buf, "func "...)
|
buf = append(buf, "func "...)
|
||||||
buf = n.Receiver().appendStr(buf, tm, depth)
|
if r := n.Receiver(); r != nil {
|
||||||
buf = append(buf, '.')
|
buf = append(buf, '(')
|
||||||
|
buf = r.appendStr(buf, tm, depth)
|
||||||
|
buf = append(buf, ")."...)
|
||||||
|
}
|
||||||
return append(buf, n.FuncName().Str(tm)...)
|
return append(buf, n.FuncName().Str(tm)...)
|
||||||
default:
|
default:
|
||||||
return append(buf, "!invalid_type!"...)
|
return append(buf, "!invalid_type!"...)
|
||||||
|
|||||||
Reference in new issue
Block a user