mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
autofree: ?string test
This commit is contained in:
parent
03327e5161
commit
67cc515e74
@ -59,6 +59,16 @@ fn match_expr() string {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn optional_str() {
|
||||||
|
q := 'select'
|
||||||
|
s := 'x'
|
||||||
|
pos := s.index('query: $q') or {
|
||||||
|
println('exiting')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
println(pos)
|
||||||
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println('start')
|
println('start')
|
||||||
foo()
|
foo()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user