[master] f7bd22658 vcc: Remove spurious assertion
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Mar 10 16:00:09 UTC 2022
commit f7bd22658ca9c2459db8268c55268345ca20b5e7
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Thu Mar 10 16:58:13 2022 +0100
vcc: Remove spurious assertion
Refs #3788
diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc
index 8404b2552..0001c186d 100644
--- a/bin/varnishtest/tests/v00016.vtc
+++ b/bin/varnishtest/tests/v00016.vtc
@@ -101,6 +101,12 @@ varnish v1 -errvcl {Expected ')' got '-'} {
}
}
+varnish v1 -errvcl {Expression has type BODY, expected BOOL} {
+ sub vcl_synth {
+ if (resp.body) { }
+ }
+}
+
varnish v1 -errvcl {Expression has type directors.shard, expected ACL} {
import directors;
backend b none;
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index c4e0380b8..677e36dbb 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -1419,8 +1419,6 @@ vcc_expr0(struct vcc *tl, struct expr **e, vcc_type_t fmt)
vcc_expr_cor(tl, e, fmt);
ERRCHK(tl);
- assert((*e)->fmt != BODY);
-
if ((*e)->fmt == fmt)
return;
More information about the varnish-commit
mailing list