www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1944] New: is-expressions don't correctly define tuples named in the match expression

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

           Summary: is-expressions don't correctly define tuples named in
                    the match expression
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: webmaster villagersonline.com


dmd 2.012

The following code should compile just fine.  Instead, the 2nd static assert()
fails.

BEGIN CODE
  template foo(TPL...)
  {
    static if( is(typeof(&TPL[0]) Tignored1 == void function(T), T) )
      static assert(is(T == int));

    static if( is(typeof(&TPL[0]) Tignored2 == void function(ARGS), ARGS...) )
      static assert(ARGS.length > 0);
  }

  void bar(int i) {};
  alias foo!(bar) baz;
END CODE


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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



Works now, probably fixed years ago.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 12 2012