]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
memberaccess: Don't check for nullability
authorTimm Bäder <mail@baedert.org>
Sat, 5 Nov 2016 15:31:33 +0000 (16:31 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 5 Nov 2016 20:15:48 +0000 (21:15 +0100)
wheter an access is nullable or not depends on the flow graph, so leave
this to the FlowAnalyzer.

vala/valamemberaccess.vala

index 6911bef65476f5b5c2e33933ecd0f98ed2919082..a40767d2dabdf505a960a2fafd9aaa878f323e36 100644 (file)
@@ -797,12 +797,6 @@ public class Vala.MemberAccess : Expression {
                                }
                        }
 
-                       if (context.experimental_non_null && instance && inner.value_type.nullable &&
-                           !(inner.value_type is PointerType) && !(inner.value_type is GenericType) &&
-                               !(inner.value_type is ArrayType)) {
-                               Report.error (source_reference, "Access to instance member `%s' from nullable reference denied".printf (symbol_reference.get_full_name ()));
-                       }
-
                        var m = symbol_reference as Method;
                        var inner_ma = inner as MemberAccess;
                        if (m != null && m.binding == MemberBinding.STATIC && m.parent_symbol is ObjectTypeSymbol &&