[vala/staging: 2/5] vala: Set source references of created DataType instances in OCE
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/5] vala: Set source references of created DataType instances in OCE
- Date: Fri, 1 Oct 2021 18:53:05 +0000 (UTC)
commit ce15989ece02de8066b3b19297103c8dba0e0cf6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Sep 28 14:13:12 2021 +0200
vala: Set source references of created DataType instances in OCE
This improves error message for expected type arguments.
vala/valaobjectcreationexpression.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index b8751eca3..a6ce8a14f 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -231,11 +231,11 @@ public class Vala.ObjectCreationExpression : Expression, CallableExpression {
if (((Class) type).is_error_base) {
type_reference = new ErrorType (null, null, source_reference);
} else {
- type_reference = new ObjectType ((Class) type);
+ type_reference = new ObjectType ((Class) type, source_reference);
}
} else if (type_sym is Struct) {
type = (TypeSymbol) type_sym;
- type_reference = new StructValueType ((Struct) type);
+ type_reference = new StructValueType ((Struct) type, source_reference);
} else if (type_sym is ErrorCode) {
type = (TypeSymbol) type_sym;
type_reference = new ErrorType ((ErrorDomain) type_sym.parent_symbol,
(ErrorCode) type_sym, source_reference);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]