Fixes https://gitlab.gnome.org/GNOME/vala/issues/362
errors/catch-error-code.vala \
errors/errors.vala \
errors/errordomain.vala \
+ errors/invalid-type-check.test \
errors/method-throws.vala \
errors/bug567181.vala \
errors/bug579101.vala \
--- /dev/null
+Invalid Code
+
+errordomain FooError {
+ FAIL;
+}
+
+void main () {
+ Object? e = null;
+
+ if (e is FooError) {
+ }
+}
return false;
}
+ if (type_reference is ErrorType && !(expression.value_type is ErrorType)) {
+ Report.error (expression.source_reference, "`%s' must be an error".printf (expression.to_string ()));
+ error = true;
+ return false;
+ }
+
if (context.profile == Profile.GOBJECT && type_reference.has_type_arguments ()) {
Report.warning (_data_type.source_reference, "Type argument list has no effect");
}