} else {
return "g_value_take_boxed";
}
- } else if (sym is Enum) {
- unowned Enum en = (Enum) sym;
- if (get_ccode_has_type_id (en)) {
- if (en.is_flags) {
- return "g_value_take_flags";
- } else {
- return "g_value_take_enum";
- }
- } else {
- if (en.is_flags) {
- return "g_value_take_uint";
- } else {
- return "g_value_take_int";
- }
- }
} else if (sym is ErrorDomain) {
return "g_value_take_boxed";
} else if (sym is Interface) {
objects/property-error.vala \
objects/property-notify.vala \
objects/property-notify-owned-getter.vala \
+ objects/property-owned-simple-type.test \
objects/property-ownership.vala \
objects/property-read-only-auto.vala \
objects/property-read-only-member-write.test \
--- /dev/null
+Invalid Code
+
+enum Bar {
+ FOO
+}
+
+class Foo : Object {
+ public Bar bar { owned get; owned set; }
+}
+
+void main () {
+}
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");