[vala/staging: 3/5] vala: Fix base-access check for compact classes (2)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 3/5] vala: Fix base-access check for compact classes (2)
- Date: Wed, 5 Feb 2020 07:53:32 +0000 (UTC)
commit 5eecd3beff3a71f60cfa136f8879f69c905300a6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Feb 5 08:32:53 2020 +0100
vala: Fix base-access check for compact classes (2)
See 84de99560ee96afa8cb80db3b342d584a72188cd
vala/valabaseaccess.vala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/vala/valabaseaccess.vala b/vala/valabaseaccess.vala
index 002514504..68a3cb8f9 100644
--- a/vala/valabaseaccess.vala
+++ b/vala/valabaseaccess.vala
@@ -78,12 +78,13 @@ public class Vala.BaseAccess : Expression {
Report.error (source_reference, "Base access invalid without base class");
return false;
} else if (context.analyzer.current_class.is_compact && context.analyzer.current_method !=
null
- && !(context.analyzer.current_method is CreationMethod) &&
context.analyzer.current_method.overrides) {
+ && !(context.analyzer.current_method is CreationMethod)
+ && (context.analyzer.current_method.overrides ||
context.analyzer.current_method.is_virtual)) {
error = true;
Report.error (source_reference, "Base access invalid in virtual overridden method of
compact class");
return false;
} else if (context.analyzer.current_class.is_compact &&
context.analyzer.current_property_accessor != null
- && context.analyzer.current_property_accessor.get_method ().overrides) {
+ && (context.analyzer.current_property_accessor.prop.overrides ||
context.analyzer.current_property_accessor.prop.is_virtual)) {
error = true;
Report.error (source_reference, "Base access invalid in virtual overridden property
of compact class");
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]