digitalmars.D.bugs - [Issue 4689] New: Error: cast from const(int) to real not allowed in safe code
- d-bugmail puremagic.com (25/30) Aug 20 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4689
- d-bugmail puremagic.com (12/12) Jun 11 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4689
http://d.puremagic.com/issues/show_bug.cgi?id=4689 Summary: Error: cast from const(int) to real not allowed in safe code Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: zan77137 nifty.com This code should be compiled: struct S{ int x; safe const real getX(){ return cast(real)x; } } Error: cast from const(int) to real not allowed in safe code See also: http://lists.puremagic.com/pipermail/phobos/2010-August/001958.html (2010/08/20 0:08), Andrei Alexandrescu wrote:-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------Compiler bug. I wonder whether const has anything to do with (shouldn't).Line 414: no need for trusted, casting numbers is not unsafe.Error: cast from const(long) to real not allowed in safe code
Aug 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4689 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies gmail.com Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 5088 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 11 2011