| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/test21008.d(110): Error: function `test21008.C.after` circular reference to class `C` |
| 5 |
fail_compilation/test21008.d(117): Error: calling non-static function `toString` requires an instance of type `Object` |
| 6 |
fail_compilation/test21008.d(117): Error: calling non-static function `toHash` requires an instance of type `Object` |
| 7 |
fail_compilation/test21008.d(117): Error: function `opCmp` is not callable using argument types `()` |
| 8 |
fail_compilation/test21008.d(117): too few arguments, expected 1, got 0 |
| 9 |
$p:druntime/import/object.d$($n$): `object.Object.opCmp(Object o)` declared here |
| 10 |
fail_compilation/test21008.d(117): Error: function `opEquals` is not callable using argument types `()` |
| 11 |
fail_compilation/test21008.d(117): too few arguments, expected 1, got 0 |
| 12 |
$p:druntime/import/object.d$($n$): `object.Object.opEquals(Object o)` declared here |
| 13 |
fail_compilation/test21008.d(117): Error: `Monitor` has no effect |
| 14 |
fail_compilation/test21008.d(117): Error: function `factory` is not callable using argument types `()` |
| 15 |
fail_compilation/test21008.d(117): too few arguments, expected 1, got 0 |
| 16 |
$p:druntime/import/object.d$($n$): `object.Object.factory(string classname)` declared here |
| 17 |
fail_compilation/test21008.d(105): called from here: `handleMiddlewareAnnotation()` |
| 18 |
--- |
| 19 |
*/ |
| 20 |
|
| 21 |
// https://issues.dlang.org/show_bug.cgi?id=21008 |
| 22 |
|
| 23 |
#line 100 |
| 24 |
|
| 25 |
class Base |
| 26 |
{ |
| 27 |
bool after(); |
| 28 |
|
| 29 |
mixin(handleMiddlewareAnnotation); |
| 30 |
} |
| 31 |
|
| 32 |
class C : Base |
| 33 |
{ |
| 34 |
override bool after(); |
| 35 |
} |
| 36 |
|
| 37 |
string handleMiddlewareAnnotation() |
| 38 |
{ |
| 39 |
foreach (member; __traits(allMembers, C)) |
| 40 |
{ |
| 41 |
__traits(getMember, C, member); |
| 42 |
} |
| 43 |
} |