repo.or.cz
/
vala-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
D-Bus: Remove extra semicolon to avoid C warning
[vala-lang.git]
/
tests
/
structs
/
bug530605.vala
blob
030564fa00fd5647df3075093e56e5456deac275
1
struct
Foo
{
2
int
bar
;
3
string
baz
;
4
5
public
Foo
(
int
bar
,
string
baz
) {
6
this
.
bar
=
bar
;
7
this
.
baz
=
baz
;
8
}
9
}
10
11
void
main
() {
12
Foo a
=
Foo
(
42
,
"hello"
);
13
Foo b
=
Foo
(
42
,
"hello"
);
14
Foo? c
=
Foo
(
42
,
"hello"
);
15
Foo d
=
Foo
(
42
,
"world"
);
16
Foo e
=
Foo
(
23
,
"hello"
);
17
18
assert
(
a
==
b
);
19
assert
(
a
==
c
);
20
assert
(
a
!=
d
);
21
assert
(
a
!=
e
);
22
}
23