1567 – call to private super-constructor should not be allowed

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 tree / graph
Reported: 2007年10月10日 08:14 UTC by Slavisa Radic
Modified: 2014年02月16日 15:24 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

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();
 }
}
Comment 1 yebblies 2011年06月11日 14:44:53 UTC
https://github.com/D-Programming-Language/dmd/pull/113 


AltStyle によって変換されたページ (->オリジナル) /