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

cgen: fix vweb app route methods filtering (#16186)

This commit is contained in:
yuyi
2022-10-24 17:51:20 +08:00
committed by GitHub
parent 26c737b6db
commit 4aa4af4afb
2 changed files with 16 additions and 1 deletions

View File

@ -92,3 +92,17 @@ fn (mut app App) some_helper<T>(result T) ApiSuccessResponse<T> {
fn (mut app App) ok() vweb.Result {
return app.json(app.some_helper(123))
}
struct ExampleStruct {
example int
}
fn (mut app App) request_raw_2() vweb.Result {
stuff := []ExampleStruct{}
return app.request_raw(stuff)
}
// should compile, this is a helper method, not exposed as a route
fn (mut app App) request_raw(foo []ExampleStruct) vweb.Result {
return app.text('Hello world')
}