Assert against empty parameter lists

This commit is contained in:
2020-02-02 20:06:41 +01:00
parent 5e39fc5cec
commit 171c725fb8
2 changed files with 8 additions and 0 deletions

View File

@@ -502,6 +502,8 @@ impl Formula
pub fn exists(parameters: std::rc::Rc<VariableDeclarations>, argument: Box<Formula>) -> Self
{
assert!(!parameters.is_empty());
Self::Exists(Exists::new(parameters, argument))
}
@@ -517,6 +519,8 @@ impl Formula
pub fn for_all(parameters: std::rc::Rc<VariableDeclarations>, argument: Box<Formula>) -> Self
{
assert!(!parameters.is_empty());
Self::ForAll(ForAll::new(parameters, argument))
}