Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
gen
/
js
/
tests
/
testdata
/
js_object_field_string.v
15
lines
·
13
sloc
·
276 bytes
·
7324e28f0f0aa42a6790a7a41c988c5d7409d5bb
Raw
1
fn
contains_hello(s string) bool {
2
return
s.contains(
'hello.v:'
)
3
}
4
5
fn
get_stack() string {
6
e := JS.Error{}
7
return
e.stack
8
}
9
10
fn
main() {
11
e := JS.Error{}
12
println(e.stack.contains(
'hello.v:'
))
13
println(contains_hello(e.stack))
14
println(get_stack().contains(
'hello.v:'
))
15
}
16