[Issue 1012] New: type templates don't support default arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 28 06:10:30 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1012

           Summary: type templates don't support default arguments
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn


# class Bar(T = int){
# }
# 
# void foo(T = int)(){
# }
# 
# void main(){
#    foo(); // success
#    auto b = new Bar(); // fails
# }

test.d(9): class test.Bar(T = int) is used as a type
test.d(9): Error: new can only create structs, dynamic arrays or class objects, 
not void's


-- 



More information about the Digitalmars-d-bugs mailing list