summaryrefslogtreecommitdiff
path: root/tests/delegates/incompatible-error-assignment.test
blob: 94b5c492a37799ae270ffc96c76a8d47a8a3d671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Invalid Code

errordomain FooError {
	FAIL;
}

errordomain BarError {
	FAIL;
}

delegate void FooFunc () throws FooError;

delegate void BarFunc () throws BarError;

void main () {
	FooFunc f = () => { throw new FooError.FAIL (""); };
	BarFunc b = f;
}