summaryrefslogtreecommitdiff
path: root/tests/basic-types/boolean.vala
blob: 1e6c04fb3bc9ecfacf499d74d162364ceb1db1d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[SimpleType]
[BooleanType]
public struct Foo {
	public void check () {
		if (this) {
			return;
		}
		assert (true);
	}
}

void main () {
	Foo foo = true;

	foo.check ();

	if (!foo) {
		assert (true);
	}
}