Commit edee8c62 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Ensure VCL instance actions imply method calls

parent 417bf145
...@@ -147,3 +147,11 @@ varnish v1 -errvcl {Syntax error} { ...@@ -147,3 +147,11 @@ varnish v1 -errvcl {Syntax error} {
directors.round_robin.backend(); directors.round_robin.backend();
} }
} }
varnish v1 -errvcl {Expected '.' got ';'} {
import directors;
sub vcl_init {
new rr = directors.round_robin();
rr;
}
}
...@@ -1431,6 +1431,7 @@ vcc_Act_Obj(struct vcc *tl, struct token *t, struct symbol *sym) ...@@ -1431,6 +1431,7 @@ vcc_Act_Obj(struct vcc *tl, struct token *t, struct symbol *sym)
struct expr *e = NULL; struct expr *e = NULL;
assert(sym->kind == SYM_INSTANCE); assert(sym->kind == SYM_INSTANCE);
ExpectErr(tl, '.');
tl->t = t; tl->t = t;
vcc_expr4(tl, &e, sym->type); vcc_expr4(tl, &e, sym->type);
ERRCHK(tl); ERRCHK(tl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment