mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
18 lines
254 B
D
18 lines
254 B
D
// https://issues.dlang.org/show_bug.cgi?id=19192
|
|
interface Foo
|
|
{
|
|
Foo covariant();
|
|
}
|
|
|
|
abstract class Frop : Foo {}
|
|
|
|
class Bar : Frop
|
|
{
|
|
Bar covariant() { return this; }
|
|
}
|
|
|
|
void main()
|
|
{
|
|
Foo foo = new Bar;
|
|
assert(foo is foo.covariant());
|
|
}
|