]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
symbolresolver: Don't assume all locals are nullable
authorTimm Bäder <mail@baedert.org>
Sat, 5 Nov 2016 20:04:19 +0000 (21:04 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 5 Nov 2016 20:15:48 +0000 (21:15 +0100)
vala/valasymbolresolver.vala

index 32c84e4c3b8a65e6714fe4236e9e17646d6873f5..a6e3e9c0cdb61c5c916bc2dec3e2d0501a64a3d9 100644 (file)
@@ -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) {