www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2426] New: Assertion failure: 'type' on line 6308 in file 'expression.c'

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

           Summary: Assertion failure: 'type' on line 6308 in file
                    'expression.c'
           Product: D
           Version: 2.019
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


auto foo(T)(T v)
{
    return v;
}

enum x = foo(1);
----
: Error: forward reference to type T
: Error: cannot implicitly convert expression (1) of type int to T
: Error: cannot cast int to T
Assertion failure: 'type' on line 6308 in file 'expression.c'

Compiles in a function scope:

auto foo(T)(T v)
{
    return v;
}

void bar()
{
    enum x = foo(1);
}


-- 
Oct 21 2008
next sibling parent ore-sama <spam here.lot> writes:
d-bugmail puremagic.com Wrote:

 line 6308

O_O
Oct 21 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2426


Don <clugdbug yahoo.com.au> changed:

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




--- Comment #1 from Don <clugdbug yahoo.com.au>  2009-05-14 03:38:09 PDT ---
Fixed sometime before D2.029.

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