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

comp_for: allow checking full mehod and arg types (#5997)

This commit is contained in:
spaceface777
2020-08-27 15:00:44 +02:00
committed by GitHub
parent 7476428def
commit eff319f869
6 changed files with 142 additions and 95 deletions

View File

@@ -370,7 +370,7 @@ fn handle_conn<T>(conn net.Socket, mut app T) {
mut vars := []string{cap: route_words_a.len}
mut action := ''
$for method in T.methods {
$if method.@type is Result {
$if method.ReturnType is Result {
attrs := method.attrs
route_words_a = [][]string{}
if attrs.len == 0 {
@@ -469,7 +469,7 @@ fn handle_conn<T>(conn net.Socket, mut app T) {
return
}
$for method in T.methods {
$if method.@type is Result {
$if method.ReturnType is Result {
// search again for method
if action == method.name && method.attrs.len > 0 {
// call action method