summaryrefslogtreecommitdiff
path: root/tests/objects/with-nested-in-lambda.vala
blob: 18a0a582cfe52b543fd49ef9ba3999c84a4816ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
delegate void FooFunc ();

class Foo {
	public int bar () {
		return 23;
	}
}

void run (FooFunc func) {
	func ();
}

void main () {
	var foo = new Foo ();

	run (() => {
		with (foo) {
			assert (bar () == 23);
		}
	});
}