fix vweb template compilation

pull/1369/head
Alexander Medvednikov 2019-07-29 19:14:05 +02:00
parent 460b4ee39f
commit ba6bcdb469
1 changed files with 1 additions and 1 deletions

View File

@ -3097,7 +3097,7 @@ fn (p mut Parser) return_st() {
} }
else { else {
// Don't allow `return val` in functions that don't return anything // Don't allow `return val` in functions that don't return anything
if p.tok == .name || p.tok == .number || p.tok == .str { if !p.is_vweb && (p.tok == .name || p.tok == .number || p.tok == .str) {
p.error('function `$p.cur_fn.name` should not return a value') p.error('function `$p.cur_fn.name` should not return a value')
} }