Skip to content
  • philippejer's avatar
    vala: Add support for null-safe access operator · 95721752
    philippejer authored and Rico Tzschichholz's avatar Rico Tzschichholz committed
    This implements support for the "null-safe" operator of C#
    (also called "safe navigation" operator).
    
      var foo = bar?.foo;
      var foo = bar?.foo();
      var foo = bar?[3];
      var foo = bar?[1:2];
    
    It applies to plain member access, method calls, element access and
    slice expressions (including void method calls, which are simply bypassed
    if the inner expression is null).
    
    Fixes GNOME/vala#522
    95721752