[vala/staging] vala: Mark tranformed member-access as qualified
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Mark tranformed member-access as qualified
- Date: Wed, 5 Aug 2020 16:01:40 +0000 (UTC)
commit eea1aa38d57b1de798ad5194f58fe21ce242b79c
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 02e093def..984266210 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -877,6 +877,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 88af4c0ca..454d856b9 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -346,6 +346,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]