Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 17686: [REG2.075.0] Covariant return types doesn't work wit…
…h override in some cases
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* REQUIRED_ARGS: | ||
* PERMUTE_ARGS: | ||
*/ | ||
|
||
// https://issues.dlang.org/show_bug.cgi?id=17686 | ||
|
||
interface INode | ||
{ | ||
@property INode parentNode(); | ||
@property IDocument ownerDocument(); | ||
} | ||
interface IDocument: INode {} | ||
interface IEntityReference: INode {} | ||
|
||
class DOMImplementation(T) | ||
{ | ||
abstract class Node: INode | ||
{ | ||
override | ||
{ | ||
@property Node parentNode() { return null; } | ||
@property Document ownerDocument() { return null; } | ||
} | ||
|
||
@property bool readonly() { return true; } | ||
} | ||
abstract class NodeWithChildren: Node {} | ||
|
||
class Document: NodeWithChildren, IDocument {} | ||
|
||
class EntityReference: NodeWithChildren, IEntityReference | ||
{ | ||
override | ||
{ | ||
@property bool readonly() { return true; } | ||
} | ||
} | ||
|
||
} | ||
|
||
void main() | ||
{ | ||
alias aaa = DOMImplementation!string; | ||
} | ||
|