summaryrefslogtreecommitdiff
path: root/vala/valaobjectcreationexpression.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-09-28 14:13:12 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2021-10-01 20:52:01 +0200
commitce15989ece02de8066b3b19297103c8dba0e0cf6 (patch)
treec6d46b47eccace6920945ddd3ca6acbccb4d91a7 /vala/valaobjectcreationexpression.vala
parent9bd69d24b5618257d5229955a2455a37af8705f5 (diff)
downloadvala-ce15989ece02de8066b3b19297103c8dba0e0cf6.tar.gz
vala: Set source references of created DataType instances in OCE
This improves error message for expected type arguments.
Diffstat (limited to 'vala/valaobjectcreationexpression.vala')
-rw-r--r--vala/valaobjectcreationexpression.vala4
1 files 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);