Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
aliases
/
aliased_field_access_test.v
12
lines
·
10
sloc
·
181 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
Data {
2
field int
3
}
4
5
type
AliasWithPtr = &Data
6
7
fn
test_aliased_field_access_test() {
8
data_with_ptr := AliasWithPtr(&Data{
9
field: 1
10
})
11
assert data_with_ptr.field == 1
12
}
13