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

fmt: insert space in front of ? for propagation (#6250)

This commit is contained in:
Uwe Krüger 2020-08-29 01:56:43 +02:00 committed by GitHub
parent 1bf7e1596b
commit 4d425b0e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1635,7 +1635,7 @@ propagate the error:
import net.http
fn f(url string) ?string {
resp := http.get(url)?
resp := http.get(url) ?
return resp.text
}
```

View File

@ -1136,7 +1136,7 @@ pub fn (mut f Fmt) or_expr(or_block ast.OrExpr) {
}
}
.propagate {
f.write('?')
f.write(' ?')
}
}
}

View File

@ -1,3 +1,3 @@
fn opt_propagate() ?int {
eventual_wrong_int()?
eventual_wrong_int() ?
}

View File

@ -14,7 +14,7 @@ fn find_all_customers(db sqlite.DB) []Customer {
}
fn main() {
db := sqlite.connect('customers.db')?
db := sqlite.connect('customers.db') ?
// select count(*) from Customer
nr_customers := sql db {
select count from Customer