
errordomain Example { EXAMPLE; }

[SimpleType]
struct Foo {
	int i;
}

class Bar {
	bool throw = true;

	public Foo foo() throws Error {
		if (throw) {
			throw new Example.EXAMPLE("");
			// Void return generated here
		}
		return { 1 };
	}
}

int main() {
	Bar bar = new Bar();
	try {
		bar.foo();
	} catch (Error err) {

	}
	return 1;
}
