www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9774] New: Error message with __error using == on tuple members

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

           Summary: Error message with __error using == on tuple members
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au



template T9774(ab...)
{
    static assert( ab[0] == ab[0]);
}

static assert( T9774!(T9774)); 
=======================
bug.d(3): Error: void has no value
bug.d(3): Error: void has no value
bug.d(3): Error: static assert  ((__error) == (__error)) is not evaluatable at
compile time
bug.d(6): Error: template instance bug.T9774!(T9774) error instantiating
=======================
The problem is that typeCombine(a, b)
with a, b tuple members,
sets a and b to ErrorExp() but does NOT return ErrorExp, so then EqualExp tries
to constant fold it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 21 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9774




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/396d9a7906b6349f5e1c5ce3818ec09e3a95ec0e
Fix issue 9774 Error message with __error using == on tuple members

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 21 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9774


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 21 2013