+tt

//+
// (Slice|Index)Exp::checkEscape(Ref)?
int[] bar3() { int[3] sa = [1,2,3]; return sa; }
ref int bar4() { int[3] sa = [1,2,3]; return sa[0]; }

// CallExp::checkEscape(Ref)? + (Slice|Index)Exp::checkEscape(Ref)?
int[3] foo1() { return [1,2,3]; }   int[] bar1() { return foo; }
int[3] foo2() { return [1,2,3]; }   ref int bar2() { return foo[0]; }
// +/

//+
int[] bar5() {
    int[] foo;
    if (true)
        return foo;     // OK
    else
        return foo[];   // OK
}
// +/