| 1 |
// https://issues.dlang.org/show_bug.cgi?id=22329 |
| 2 |
// EXTRA_FILES: imports/imp22329.d |
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/imports/imp22329.d(3): Error: no property `values` for type `test22329.Foo` |
| 7 |
fail_compilation/test22329.d(14): struct `Foo` defined here |
| 8 |
fail_compilation/imports/imp22329.d(3): Error: operator `+` is not defined for type `Foo` |
| 9 |
fail_compilation/test22329.d(14): perhaps overload the operator with `auto opBinary(string op : "+")(int rhs) {}` |
| 10 |
fail_compilation/test22329.d(22): Error: template instance `imp22329.func!(Foo)` error instantiating |
| 11 |
--- |
| 12 |
*/ |
| 13 |
|
| 14 |
public struct Foo { |
| 15 |
private int values; |
| 16 |
alias values this; |
| 17 |
} |
| 18 |
|
| 19 |
void main() |
| 20 |
{ |
| 21 |
import imports.imp22329 : func; |
| 22 |
func(Foo()); |
| 23 |
} |