[vala/wip/baedert/nullable: 8/25] symbolresolver: Don't assume all locals are nullable



commit aec692dc1f3dd46daaa4e2085080ffb7808b90de
Author: Timm Bäder <mail baedert org>
Date:   Sat Nov 5 21:04:19 2016 +0100

    symbolresolver: Don't assume all locals are nullable

 vala/valasymbolresolver.vala |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 32c84e4..a6e3e9c 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -377,18 +377,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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]