Sireesh Kodali

Results 18 comments of Sireesh Kodali

I've removed the second overload for the following reasons: - It does not work with local functions - Also makes it harder to unittest. - None of the other functions...

I have no clue what happened! I'm going to close this PR and start over

Thanks, I panicked a bit after that. I'll add changelog and fix the docs now

See https://forum.dlang.org/post/[email protected] Essentially: ```d int[] f(int x) pure { return [x]; } immutable var = f(1); // works ``` This was previously incorrectly reported to not be strongly pure. I've...

>Obviously, rewriting this to > >```d >auto var1 = f(1); >var1[0] = 0; >auto var2 = var1; >``` >would be wrong. Makes sense. Then I think `isStronglyPure` should require that...

I've changed it to require that the return type is strictly `immutable` or `void`. I'll squash the commits later

If `f` was marked strongly pure, then ```d auto var1 = f(1); var1[0] = 0; auto var2 = var1; ``` becomes correct. On the other hand if `f`'s return type...

Ping. Should I revert this to the old behaviour (allow implicit conversion to `immutable`) or is the new stricter behaviour preferable? I think the strict behaviour should be preferred, since...

Ok I think I've addressed all the comments except Andrei's. He said that `ref` return types should not be allowed, but I'm not sure how to check if the return...

Ok I figured out how to check if return type is `ref`. It applies as a function's attributes, as in the docs. `ref` return types are now not allowed unless...