dmd/compiler/test/runnable/test19192.d
2022-07-09 18:53:07 +02:00

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());
}