http://d.puremagic.com/issues/show_bug.cgi?id=6624
Summary: Functions with Parameters Implicitly Convertible to Immutable Are Not Pure Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2011-09-08 07:00:45 PDT --- Using 2.055, where you're allowed to implicitly convert return values of strongly pure functions to immutable. char[] foo(string s) pure { return s.dup; } void main() { string dummy; string s = foo(dummy); } D:\home\dsimcha\bin\test.d(7): Error: cannot implicitly convert expression (foo(dummy)) of type char[] to string If I change the signature to: char[] foo(immutable string s) pure then it works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------