summaryrefslogtreecommitdiff
path: root/vala/valasymbolresolver.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-10-16 22:19:24 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-10-17 15:41:50 +0200
commitb9f8e20c75fb2f023f3b54979e1d25cac13071a9 (patch)
treeb02b5e0f876c059fa82a102c7c3a276679ff3442 /vala/valasymbolresolver.vala
parentdc7202d69d9945a31e0b89caf6a5731aef60fabc (diff)
downloadvala-b9f8e20c75fb2f023f3b54979e1d25cac13071a9.tar.gz
vala: Move nullable setting of LocalVariable with reference type to check()
... and keep skipping it in non-null mode. Originally introduced with 80c18a1d1ff357be7f1d0f50f1aa331f206a0a0a Fixes https://gitlab.gnome.org/GNOME/vala/issues/684
Diffstat (limited to 'vala/valasymbolresolver.vala')
-rw-r--r--vala/valasymbolresolver.vala15
1 files changed, 0 insertions, 15 deletions
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 55fa94f62..0913dedf2 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -28,7 +28,6 @@ using GLib;
* Code visitor resolving symbol names.
*/
public class Vala.SymbolResolver : CodeVisitor {
- CodeContext context;
Symbol root_symbol;
Scope current_scope;
@@ -38,13 +37,11 @@ public class Vala.SymbolResolver : CodeVisitor {
* @param context a code context
*/
public void resolve (CodeContext context) {
- this.context = context;
root_symbol = context.root;
context.root.accept (this);
root_symbol = null;
- this.context = null;
}
public override void visit_namespace (Namespace ns) {
@@ -385,18 +382,6 @@ public class Vala.SymbolResolver : CodeVisitor {
public override void visit_local_variable (LocalVariable local) {
local.accept_children (this);
- if (!context.experimental_non_null) {
- // local reference variables are considered nullable
- // except when using experimental non-null enhancements
- if (local.variable_type is ReferenceType) {
- var array_type = local.variable_type as ArrayType;
- if (array_type != null && array_type.fixed_length) {
- // local fixed length arrays are not nullable
- } else {
- local.variable_type.nullable = true;
- }
- }
- }
}
public override void visit_initializer_list (InitializerList list) {