[Issue 14163] No line number for error with disabled class constructor

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 10 01:39:07 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14163

--- Comment #1 from bearophile_hugs at eml.cc ---
Some comments by Steven Schveighoffer and Jonathan M Davis:

>> It really is only useful in the case where you don't want to define a
>> constructor. Which probably means -- you don't want to use a class anyway ;)
>>
>> But for completeness, it seems like I should be able to have the option
>> of disabling something the compiler does by default. Even if it's next
>> to useless.
>
> I suppose that it makes sense if you want to make it so that the class can't
> be constructed (and actually, now that I look at it, that's what
> std.datetime.Clock does), but if another constructor has been declared, then
> it should be probably be disallowed at compile time - especially if it's
> resulting in a linker error.

--


More information about the Digitalmars-d-bugs mailing list