aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/vlib/v/fmt/tests/structs_input.vv
blob: c17259a31027cd12ab9369e8817af5d6874ff45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
struct User {
	name string // name
	name2 []rune // name2
	very_long_field bool
	age int // age
	very_long_type_field1 very_looooog_type // long
	very_long_type_field2 very_loooooooong_type // long
}

struct FamousUser {
pub:
	User
	aka string
}

struct Foo {
	field1 int // f1
	field2 string // f2
	pub:
	public_field1 int // f1
	public_field2 f64 // f2
	mut:
	mut_field string
	pub mut:
	pub_mut_field string
}

struct Bar { Foo }

fn new_user()
User
{
  return User{
    name: 'Serious Sam'
          age: 19
           }
}

struct SomeStruct {
// 1
mut:
// 2
// 3
somefield /*4*/ /*5*/ int /*6*/ /*7*/ /*8*/ /*
9
10
*/
somefield2 /*11*/ int // 12
pub:




somefield3 int



somefield4 int
/*
13
14
*/
}

struct C.Foo