Having not used the "ref local" feature myself, I glossed over the fact that it requires ref on the right side of the assignment operator:
ref var x = ref y;
x = ref y;
EC# allows ref (and any other attribute-keyword) on any expression, but if it is not at the beginning of the expression, the subexpression must be in parentheses:
ref var x = (ref y);
x = (ref y);
Unfortunately, C# rejects the latter code, so it will be necessary to modify the parser and printer to support ref without parens.
Having not used the "ref local" feature myself, I glossed over the fact that it requires
ref
on the right side of the assignment operator:EC# allows
ref
(and any other attribute-keyword) on any expression, but if it is not at the beginning of the expression, the subexpression must be in parentheses:Unfortunately, C# rejects the latter code, so it will be necessary to modify the parser and printer to support
ref
without parens.