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:
committed by
Alexander Medvednikov
parent
7c802f31d3
commit
8fbfceed30
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user