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

compiler: generics - support across modules/files

This commit is contained in:
joe-conigliaro
2019-11-22 16:22:11 +11:00
committed by Alexander Medvednikov
parent 7c802f31d3
commit 8fbfceed30
8 changed files with 156 additions and 195 deletions

View File

@@ -13,8 +13,8 @@ pub mut:
}
fn main() {
mut app := App{}
vweb.run(app, port)
app := App{}
vweb.run(mut app, port)
//vweb.run<App>(Port)
}
@@ -22,7 +22,7 @@ pub fn (app mut App) init() {
app.vweb.handle_static('.')
}
pub fn (app mut App) json_endpoint() {
pub fn (app & App) json_endpoint() {
app.vweb.json('{"a": 3}')
}
@@ -34,7 +34,7 @@ pub fn (app mut App) index() {
}
*/
pub fn (app mut App) text() {
pub fn (app & App) text() {
app.vweb.text('hello world')
}