]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail10806.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail10806.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail10806.d(12): Error: function `fail10806.Class.clone` incompatible covariant types `First()` and `Second()`
5 ---
6 */
7
8 interface First { First clone(); }
9 interface Second { Second clone(); void call(); }
10
11 class Class : First, Second {
12 override Class clone() { return this; }
13 override void call() { }
14 }
15
16 void main() {
17 (cast(Second) new Class).clone().call();
18 }