(resultType T, argTypes []T, isInstance bool, format formatter)
| 156 | } |
| 157 | |
| 158 | func formatFunctionInternal[T any](resultType T, argTypes []T, isInstance bool, format formatter) string { |
| 159 | result := "" |
| 160 | if isInstance { |
| 161 | target := argTypes[0] |
| 162 | argTypes = argTypes[1:] |
| 163 | result += format(target) |
| 164 | result += "." |
| 165 | } |
| 166 | result += "(" |
| 167 | for i, arg := range argTypes { |
| 168 | if i > 0 { |
| 169 | result += ", " |
| 170 | } |
| 171 | result += format(arg) |
| 172 | } |
| 173 | result += ")" |
| 174 | rt := format(resultType) |
| 175 | if rt != "" { |
| 176 | result += " -> " |
| 177 | result += rt |
| 178 | } |
| 179 | return result |
| 180 | } |
| 181 | |
| 182 | // kindOf returns the kind of the type as defined in the checked.proto. |
| 183 | func kindOf(t *exprpb.Type) int { |
no outgoing calls
no test coverage detected