[Issue 1114] New: Indexed tuple cannot be used in inheritance	declaration
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Apr  8 17:31:58 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1114
           Summary: Indexed tuple cannot be used in inheritance declaration
           Product: D
           Version: 1.010
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: reiner.pope at gmail.com
You can't use [ or ] in when declaring a base class:
template Tuple(T...)
{
    alias T Tuple;
}
class Foo {}
alias Tuple!(Foo) MyTup;
class Bar
   : MyTup[0] // Fails here
{}
inherittuple.d(11): members expected
inherittuple.d(11): { } expected following aggregate declaration
inherittuple.d(11): Declaration expected, not '['
It's not too big an issue, since you can replace it with
alias MyTup[0] TheBaseClass;
class Bar
   : TheBaseClass 
{}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list