diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-21 11:14:49 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-21 11:14:49 +0100 |
commit | f8c0ce38c6954069a81561bff8207bf43a81c10f (patch) | |
tree | 3b433ecb7eaa3fb88981709d0c66834d7c65338f /vala/valapropertyaccessor.vala | |
parent | c9c112d5ed9516405a1d87f390889a7003facdbc (diff) | |
download | vala-f8c0ce38c6954069a81561bff8207bf43a81c10f.tar.gz |
vala: Owned property accessors are not allowed for non-null simple types
Additionally drop invalid g_value_take_* references for enums
Diffstat (limited to 'vala/valapropertyaccessor.vala')
-rw-r--r-- | vala/valapropertyaccessor.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala index 0fbf4d32f..72e5ce675 100644 --- a/vala/valapropertyaccessor.vala +++ b/vala/valapropertyaccessor.vala @@ -218,6 +218,12 @@ public class Vala.PropertyAccessor : Subroutine { return false; } + if (value_type.value_owned && value_type.is_non_null_simple_type ()) { + error = true; + Report.error (source_reference, "`owned' accessor not allowed for specified property type"); + return false; + } + if (context.profile == Profile.POSIX && construction) { error = true; Report.error (source_reference, "`construct' is not supported in POSIX profile"); |