summaryrefslogtreecommitdiff
path: root/tests/nullability/var-type.vala
blob: 42442b18ee9d97962f833cd36a4feee1358e333f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void main () {
	{
		unowned var? foo = "foo";
		assert (foo != null);
	}
	{
		foreach (unowned var? foo in new string[] { "foo", "bar" }) {
			assert (foo != null);
		}
	}
	{
		with (unowned var? foo = "foo") {
			assert (foo != null);
		}
	}
}