On 9/28/2014 1:25 PM, H. S. Teoh via Digitalmars-d wrote:
This is not directly related to this thread, but recently in a Phobos PR we discovered the following case:// This function gets inlined: int func1(int a) { if (someCondition) { return value1; } else { return value2; } } // But this one doesn't: int func2(int a) { if (someCondition) { return value1; } return value2; } IIRC Kenji said something about the first case being convertible to an expression, but the second can't. It would be nice if inlining worked for both cases, since semantically they are the same.
https://issues.dlang.org/show_bug.cgi?id=7625
