[vala/0.48] vala: Mark tranformed member-access as qualified
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] vala: Mark tranformed member-access as qualified
- Date: Mon, 10 Aug 2020 07:18:17 +0000 (UTC)
commit 1a3aecd2d4e2e92f26b995447b7ad09ded7704f3
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Aug 5 17:45:39 2020 +0200
vala: Mark tranformed member-access as qualified
Regression of 866258f688d781f3536892b8f93abdd3112198ec
See https://gitlab.gnome.org/GNOME/vala/issues/57
tests/Makefile.am | 1 +
.../member-access-transformed-qualified.vala | 20 ++++++++++++++++++++
vala/valamemberaccess.vala | 1 +
3 files changed, 22 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6b2dcd032..c5c8fc3de 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -863,6 +863,7 @@ TESTS = \
semantic/member-access-protected-invalid.test \
semantic/member-access-undefined.test \
semantic/member-access-static-with-instance.vala \
+ semantic/member-access-transformed-qualified.vala \
semantic/method-abstract.test \
semantic/method-abstract-body.test \
semantic/method-async-ref-parameter.test \
diff --git a/tests/semantic/member-access-transformed-qualified.vala
b/tests/semantic/member-access-transformed-qualified.vala
new file mode 100644
index 000000000..f8c273d08
--- /dev/null
+++ b/tests/semantic/member-access-transformed-qualified.vala
@@ -0,0 +1,20 @@
+using Foo.Bar;
+using Foo.Manam;
+
+namespace Foo.Bar {
+ public int bar = 23;
+}
+
+namespace Foo.Manam {
+ public class Foo {
+ public static void faz () {
+ bar = 42;
+ }
+ }
+}
+
+void main () {
+ assert (bar == 23);
+ Foo.Manam.Foo.faz ();
+ assert (bar == 42);
+}
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index be4c84905..6891306ec 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -327,6 +327,7 @@ public class Vala.MemberAccess : Expression {
inner_ma = (MemberAccess) inner_ma.inner;
inner_sym = inner_sym.parent_symbol;
}
+ inner_ma.qualified = true;
inner.check (context);
symbol_reference = local_sym;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]