-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid define.go
for complex Guard
#176
Comments
So, the issue is with this section of code: fn render_expression(cs: &ConstraintSet, e: &Node) -> String {
match e.e() {
...
Expression::List(constraints) => constraints
.iter()
.map(|e| render_expression(cs, e))
.map(|mut x| {
if let Some(true) = x.chars().last().map(|c| c != ',') {
x.push(',');
}
x
})
.collect::<Vec<_>>()
.join("\n"), In essence, we have a Q) Does it even make sense to be rendering a UPDATE: Seems that this is only arising in the case of |
Ok, we can fix the above by a slight modification in
Does this seem syntactically malformed? Its curious that UPDATE: in the body of a constraint, this has an effect (though not the desired one). For example, this:
Generates three vanishing constraints:
But, I suppose the problem is that, in the context of a guard I suppose this doesn't even make sense. |
This should fail at the verification of the arguments to In this case, the appropriate guard expression would be |
Yeah, that makes sense. I will look into doing that tomorrow :) |
Ok, merged in fix for the minimal example at top of this issue (which uses a |
Minimal example:
This produces the following
define.go
:Note the last line contains a syntax error:
... AsVariable(),.Mul( ...
The text was updated successfully, but these errors were encountered: