delegates/incompatible.test \
delegates/incompatible-assignment.test \
delegates/incompatible-error-assignment.test \
+ delegates/incompatible-error-argument.test \
+ delegates/incompatible-error-argument-2.test \
delegates/incompatible-initializer.test \
delegates/incompatible-target.test \
delegates/instance-method-to-no-target.test \
--- /dev/null
+Invalid Code
+
+errordomain FooError {
+ FAIL;
+}
+
+errordomain BarError {
+ FAIL;
+}
+
+delegate void FooFunc () throws FooError;
+
+void bar () throws BarError {
+ throw new BarError.FAIL ("");
+}
+
+void foo (FooFunc f) {
+}
+
+void main () {
+ foo (bar);
+}
--- /dev/null
+Invalid Code
+
+errordomain FooError {
+ FAIL;
+}
+
+errordomain BarError {
+ FAIL;
+}
+
+delegate void FooFunc () throws FooError;
+
+delegate void BarFunc () throws BarError;
+
+void foo (FooFunc f) {
+}
+
+void main () {
+ BarFunc bar = () => { throw new BarError.FAIL (""); };
+ foo (bar);
+}
// Append error-types
var error_types = new ArrayList<DataType> ();
- get_error_types (error_types);
+ callable_symbol.get_error_types (error_types);
if (error_types.size > 0) {
builder.append (" throws ");