diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-03 18:29:43 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-03 23:53:33 +0200 |
commit | 4e695a4e374df741859651f62e9a554f55991aac (patch) | |
tree | 00b7b61f4b253985361ec1f5efc41cb56b67b70b /vala/valasemanticanalyzer.vala | |
parent | d4f1dd4104b448dc4ad702d6d64c8361c2adb89c (diff) | |
download | vala-4e695a4e374df741859651f62e9a554f55991aac.tar.gz |
vala: Exclude nullable simple-type structs from gobject-property support
Defining "bool? { owned get; set; }" in a GObject class resulted in:
"error: The type `bool' doesn't declare a GValue take function"
Fixes a regression of 3af1cfb3bf6b1d3d4a8116382e6eda702f7335bf and reverts
to the old behavior for nullable simple-type structs.
Diffstat (limited to 'vala/valasemanticanalyzer.vala')
-rw-r--r-- | vala/valasemanticanalyzer.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index f81921296..4a8e777a4 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -451,7 +451,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { public bool is_gobject_property_type (DataType property_type) { var st = property_type.data_type as Struct; if (st != null) { - if (st.get_attribute_bool ("CCode", "has_type_id", true)) { + if (!st.is_simple_type () && st.get_attribute_bool ("CCode", "has_type_id", true)) { // Allow GType-based struct types } else if (property_type.nullable) { return false; |