[Issue 14163] No line number for error with disabled class constructor
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 10 05:03:38 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14163
--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to bearophile_hugs from comment #0)
> class Foo {
> @disable this();
> }
> class Bar : Foo {
> @disable this();
> this(int i) {}
> }
> void main() {}
>
>
>
> Gives no line number in the error message:
>
> Error: constructor test.Foo.this is not callable because it is annotated
> with @disable
>
>
> Additionally this gives a linker error, but perhaps the front-end should
> catch this at compile-time:
>
>
> class Foo {
> @disable this();
> this(int i) {}
> }
> void main() {}
>
>
> test.obj(test)
> Error 42: Symbol Undefined _D4test3Foo6__ctorMFZC4test3Foo
I separated the link-failure issue to:
https://issues.dlang.org/show_bug.cgi?id=14165
--
More information about the Digitalmars-d-bugs
mailing list