[vala/staging] vala: Don't ever skip check for construct-only property assignment
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Don't ever skip check for construct-only property assignment
- Date: Fri, 26 Feb 2021 12:44:29 +0000 (UTC)
commit c478dd4646906ae81ff5ba1e45f51a35b92a06ca
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Feb 26 13:44:09 2021 +0100
vala: Don't ever skip check for construct-only property assignment
Missed in 92cb97f4f806fb6362834bf218e8021453c22f07
vala/valaassignment.vala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index 6f4c6d2d0..194f44d22 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -282,8 +282,7 @@ public class Vala.Assignment : Expression {
ma.error = true;
Report.error (ma.source_reference, "Property `%s' is read-only",
prop.get_full_name ());
return false;
- } else if (!context.deprecated
- && !prop.set_accessor.writable
+ } else if (!prop.set_accessor.writable
&& context.analyzer.find_current_method () is CreationMethod) {
if (ma.inner.symbol_reference != context.analyzer.find_current_method
().this_parameter) {
// trying to set construct-only property in creation method
for foreign instance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]