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

Function GetTypeContext

symbols/typeexprs.go:342–350  ·  view source on GitHub ↗

GetTypeContext returns type context containing all type vars, with /any bound.

(typeExpr ast.BaseTerm)

Source from the content-addressed store, hash-verified

340
341// GetTypeContext returns type context containing all type vars, with /any bound.
342func GetTypeContext(typeExpr ast.BaseTerm) map[ast.Variable]ast.BaseTerm {
343 typeCtx := map[ast.Variable]ast.BaseTerm{}
344 typeVars := map[ast.Variable]bool{}
345 ast.AddVars(typeExpr, typeVars)
346 for v := range typeVars {
347 typeCtx[v] = ast.AnyBound
348 }
349 return typeCtx
350}

Callers 1

checkClausesMethod · 0.92

Calls 1

AddVarsFunction · 0.92

Tested by

no test coverage detected