[vala/staging] vala: Mark tranformed static member-access as qualified
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Mark tranformed static member-access as qualified
- Date: Sat, 20 Mar 2021 21:53:20 +0000 (UTC)
commit 916cd995b2dbb66fe45c04e830891f2cfb1fd522
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Mar 20 22:52:57 2021 +0100
vala: Mark tranformed static member-access as qualified
Regression of 1084348f3a6d1113dfc09b3bb5ca6b94a0d812e9
See https://gitlab.gnome.org/GNOME/vala/issues/270
tests/Makefile.am | 1 +
.../member-access-static-transformed-qualified.vala | 14 ++++++++++++++
vala/valamemberaccess.vala | 1 +
3 files changed, 16 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3276d3039..c3083a2f3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1012,6 +1012,7 @@ TESTS = \
semantic/member-access-protected-invalid.test \
semantic/member-access-undefined.test \
semantic/member-access-static-with-instance.vala \
+ semantic/member-access-static-transformed-qualified.vala \
semantic/member-access-transformed-qualified.vala \
semantic/method-abstract.test \
semantic/method-abstract-body.test \
diff --git a/tests/semantic/member-access-static-transformed-qualified.vala
b/tests/semantic/member-access-static-transformed-qualified.vala
new file mode 100644
index 000000000..6469ffd88
--- /dev/null
+++ b/tests/semantic/member-access-static-transformed-qualified.vala
@@ -0,0 +1,14 @@
+namespace Manam {
+ class Manam {
+ }
+
+ class Foo {
+ public static void bar () {
+ }
+ }
+
+ void main () {
+ var foo = new Foo ();
+ foo.bar ();
+ }
+}
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index c35881b66..ae8079bd2 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -968,6 +968,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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]