def extra_defect

bend-schema-lib@0.4.1.0 · core.bend:1155

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

1155# At a strict object the path is one key, and the replay checks it on its
1156# own: the key is there, and it is not one of the names.
1157def extra_defect(ns: List<&2, String>, +r: Raw, p: List<&2, Step>) -> Maybe<&2, Why>:
1158  match p:
1159    case AtKey{+k} <> Nil{}:
1160      guard(Bool.and(has_key(k, r), Bool.not(in_names(k, ns))), Some{UnknownKey{}})
1161    case _:
1162      None{}

Uses (11)

Used by (1)