Community
Participate
Working Groups
while(a?.b?.c != null){ } is translated to : B _b = null; if (a!=null) { _b=a.getB(); } C _c = null; if (_b!=null) { _c=_b.getC(); } boolean _notEquals = (!Objects.equal(_c, null)); boolean _while = _notEquals; while (_while) { Integer _limit = a.getLimit(); InputOutput.<Integer>println(_limit); C _c_1 = null; //error: a?.b is not evaluated again if (_b!=null) { _c_1=_b.getC(); } boolean _notEquals_1 = (!Objects.equal(_c_1, null)); _while = _notEquals_1; }
Created attachment 266132 [details] xtend code
see https://github.com/eclipse/xtext-xtend/issues/144 as well