MCPcopy
hub / github.com/google/mangle / GetBuiltinFunctionType

Function GetBuiltinFunctionType

builtin/builtin.go:182–190  ·  view source on GitHub ↗

GetBuiltinFunctionType returns the type of a builtin function. The type may contain type variables.

(sym ast.FunctionSym)

Source from the content-addressed store, hash-verified

180// GetBuiltinFunctionType returns the type of a builtin function.
181// The type may contain type variables.
182func GetBuiltinFunctionType(sym ast.FunctionSym) (ast.BaseTerm, bool) {
183 if tpe, ok := Functions[sym]; ok {
184 return tpe, true
185 }
186 if tpe, ok := Functions[ast.FunctionSym{sym.Symbol, -1}]; ok {
187 return tpe, true // variable arity
188 }
189 return nil, false
190}
191
192// IsBuiltinFunction returns true if sym is a builtin function.
193func IsBuiltinFunction(sym ast.FunctionSym) bool {

Callers 2

boundOfArgFunction · 0.92
typeOfFnFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected