http://d.puremagic.com/issues/show_bug.cgi?id=8408
Summary: Purity calculation should be improved Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2012-07-22 05:27:35 PDT --- If the argument values that given to a function marked as pure doesn't appear in its return value, then the function should become 'strong purity'. An example: int[] func(const(int)[] arr) pure; The parameter 'arr' refers const integers through its slice, but func returns int[], so func cannot return arr directly (without unsafe cast) and becomes 'strong purity' function. The parameter 'arr' refers const integers through its slice, but func returns int[]. const(int)[] is not implicitly convertible to int[], then func cannot return arr directly (without unsafe cast like cast(int[]) arr) and becomes 'strong purity' function. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------