https://issues.dlang.org/show_bug.cgi?id=17512
--- Comment #2 from johanenge...@weka.io --- Or... it _is_ a frontend bug, as the compiler should deduce that the return type cannot be 'ref'. It correctly deduces that ("does not return any indirections") but because it added "return" function attribute earlier, the error happens. (sorry for the confusion, not thinking clearly) --