D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1567 - call to private super-constructor should not be allowed
Summary: call to private super-constructor should not be allowed
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid, patch
Depends on:
Blocks: 3108
  Show dependency treegraph
 
Reported: 2007-10-10 08:14 UTC by Slavisa Radic
Modified: 2014-02-16 15:24 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Slavisa Radic 2007-10-10 08:14:24 UTC
When inheriting from a super class with private constructor, a call to the private super-constructor from inside the inheriting class is not recognized as error.

Example:
module abstractClass;

abstract class AbstractClass
{
    private this()
    {
    }
}
---------------------
import abstractClass;

class InheritingClass : AbstractClass
{
    public this()
    {
        super();
    }
}