git.delta.rocks / jrsonnet / refs/commits / f3a68fbe7763

difftreelog

fix(evaluator) restrict standalone `super` usage

Лач2020-06-25parent: #9b33194.patch.diff
in: master

2 files changed

modifiedcrates/jsonnet-evaluator/src/error.rsdiffbeforeafterboth
--- a/crates/jsonnet-evaluator/src/error.rs
+++ b/crates/jsonnet-evaluator/src/error.rs
@@ -22,6 +22,8 @@
 	ValueIndexMustBeTypeGot(ValType, ValType, ValType),
 	CantIndexInto(ValType),
 
+	StandaloneSuper,
+
 	RuntimeError(String),
 	StackOverflow,
 	FractionalIndex,
modifiedcrates/jsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth
811 file_path.push(path);811 file_path.push(path);
812 Val::Str(with_state(|s| s.import_file_str(&file_path))?)812 Val::Str(with_state(|s| s.import_file_str(&file_path))?)
813 }813 }
814 Literal(LiteralType::Super) => return create_error(crate::error::Error::StandaloneSuper),
814 })815 })
815}816}
816817