MCPcopy
hub / github.com/expr-lang/expr / MaybeCompatible

Method MaybeCompatible

checker/nature/nature.go:567–573  ·  view source on GitHub ↗
(c *Cache, rhs Nature, cs ...NatureCheck)

Source from the content-addressed store, hash-verified

565}
566
567func (n *Nature) MaybeCompatible(c *Cache, rhs Nature, cs ...NatureCheck) bool {
568 nIsUnknown := n.IsUnknown(c)
569 rshIsUnknown := rhs.IsUnknown(c)
570 return nIsUnknown && rshIsUnknown ||
571 nIsUnknown && rhs.IsAnyOf(cs...) ||
572 rshIsUnknown && n.IsAnyOf(cs...)
573}
574
575func (n *Nature) MakeArrayOf(c *Cache) Nature {
576 nt := c.FromType(arrayType)

Callers 1

binaryNodeMethod · 0.80

Calls 2

IsUnknownMethod · 0.95
IsAnyOfMethod · 0.95

Tested by

no test coverage detected