1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ast, cgen, checker, parser: support method arguments in comptime $for (#9208)

This commit is contained in:
Miccah
2021-03-11 07:04:34 -06:00
committed by GitHub
parent 8de6511056
commit f26d2f02b7
10 changed files with 112 additions and 53 deletions

View File

@@ -379,12 +379,12 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
// should be called first.
if !route_path.contains('/:') && url_words == route_words {
// We found a match
app.$method(method_args)
app.$method()
return
}
if url_words.len == 0 && route_words == ['index'] && method.name == 'index' {
app.$method(method_args)
app.$method()
return
}