| 1 |
// https://issues.dlang.org/show_bug.cgi?id=19192 |
| 2 |
interface Foo |
| 3 |
{ |
| 4 |
Foo covariant(); |
| 5 |
} |
| 6 |
|
| 7 |
abstract class Frop : Foo {} |
| 8 |
|
| 9 |
class Bar : Frop |
| 10 |
{ |
| 11 |
Bar covariant() { return this; } |
| 12 |
} |
| 13 |
|
| 14 |
void main() |
| 15 |
{ |
| 16 |
Foo foo = new Bar; |
| 17 |
assert(foo is foo.covariant()); |
| 18 |
} |