www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1958] New: Casting to invariant breaks CTFE

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1958

           Summary: Casting to invariant breaks CTFE
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


----
string foo()
{    
    char[] s;    
    s ~= "aaa";

    return cast(invariant)s;
}

enum s = foo();
----
Error: cannot evaluate foo() at compile time


-- 
Mar 30 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1958


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED





Fixed sometime before 2.031.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009