Thread overview | |||||
---|---|---|---|---|---|
|
December 30, 2004 instantiation of class with abstract this() not caught by compiler | ||||
---|---|---|---|---|
| ||||
I was looking into making classes abstract when I came across this. class Base { abstract this(); } void main() { Base b=new Base; } This compiles, but thankfully fails to link, as it cannot find the constructor function for Base. The compiler should catch this, as it throws an error if you try to instantiate a class with other undefined abstract methods. Unless of course, there is something that prohibits this from happening, in which case I'll eat my words ;) |
December 30, 2004 Re: instantiation of class with abstract this() not caught by compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley Attachments: | Added to DStress as http://dstress.kuehne.cn/nocompile/abstract_05.d Thomas |
March 10, 2005 Re: instantiation of class with abstract this() not caught by compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | It's also fixed <g>. |
Copyright © 1999-2021 by the D Language Foundation