}
} else if (sym is Enum) {
type = new EnumValueType ((Enum) sym);
- } else if (sym is ErrorDomain) {
- type = new ErrorType ((ErrorDomain) sym, null);
- } else if (sym is ErrorCode) {
- type = new ErrorType ((ErrorDomain) sym.parent_symbol, (ErrorCode) sym);
} else {
Report.error (null, "internal error: `%s' is not a supported type".printf (sym.get_full_name ()));
return new InvalidType ();
checked = true;
- error_expression.target_type = new ErrorType (null, null, source_reference);
+ if (analyzer.context.profile == Profile.GOBJECT) {
+ error_expression.target_type = new ErrorType (null, null, source_reference);
+ } else {
+ error_expression.target_type = analyzer.error_type.copy ();
+ }
error_expression.target_type.value_owned = true;
if (error_expression != null) {