MCPcopy Create free account
hub / github.com/cel-expr/cel-go / setReference

Method setReference

checker/checker.go:684–690  ·  view source on GitHub ↗
(e ast.Expr, r *ast.ReferenceInfo)

Source from the content-addressed store, hash-verified

682}
683
684func (c *checker) setReference(e ast.Expr, r *ast.ReferenceInfo) {
685 if old, found := c.ReferenceMap()[e.ID()]; found && !old.Equals(r) {
686 c.errors.referenceRedefinition(e.ID(), c.location(e), e, old, r)
687 return
688 }
689 c.SetReference(e.ID(), r)
690}
691
692func (c *checker) assertType(e ast.Expr, t *types.Type) {
693 if !c.isAssignable(t, c.getType(e)) {

Callers 5

checkIdentMethod · 0.95
checkSelectMethod · 0.95
checkOptSelectMethod · 0.95
checkCreateStructMethod · 0.95

Calls 6

locationMethod · 0.95
ReferenceMapMethod · 0.80
EqualsMethod · 0.80
referenceRedefinitionMethod · 0.80
SetReferenceMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected