Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
selectorexpt_field_name_test.v
15
lines
·
13
sloc
·
273 bytes
·
690961b79626e0a6b2682fdda3a43f50ca8b276d
Raw
1
// for issue 20436
2
// phenomenon:
3
// close_scope() is lost when selectexpr has two special names: sort and sorted.
4
// This problem can be tested using closure arguments.
5
struct
Foo {
6
sort []int
7
}
8
9
fn
test_main() {
10
f := Foo{}
11
12
fn
[f] () {
13
assert f.sort.len == 0
14
}()
15
}
16