git.delta.rocks / jrsonnet / refs/commits / 0d81f3bd1040

difftreelog

fix insert field access stack frame

Yaroslav Bolyukin2023-08-19parent: #61f48e9.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/evaluate/mod.rsdiffbeforeafterboth
19 typed::Typed,19 typed::Typed,
20 val::{CachedUnbound, IndexableVal, StrValue, Thunk, ThunkValue},20 val::{CachedUnbound, IndexableVal, StrValue, Thunk, ThunkValue},
21 Context, GcHashMap, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result, ResultExt,21 Context, GcHashMap, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result, ResultExt,
22 State, Unbound, Val,22 State, Unbound, Val, Error,
23};23};
24pub mod destructure;24pub mod destructure;
25pub mod operator;25pub mod operator;
502 None => {502 None => {
503 let suggestions = suggest_object_fields(&v, key.clone().into_flat());503 let suggestions = suggest_object_fields(&v, key.clone().into_flat());
504504
505 bail!(NoSuchField(key.clone().into_flat(), suggestions))505 return Err(Error::from(NoSuchField(
506 key.clone().into_flat(),
507 suggestions,
508 )))
509 .with_description_src(&part.value, || format!("field <{key}> access"));
506 }510 }
507 },511 },
508 (Val::Obj(_), n) => bail!(ValueIndexMustBeTypeGot(512 (Val::Obj(_), n) => bail!(ValueIndexMustBeTypeGot(