tests/dmd/runnable/imports/link13400a.d
raw| 1 | module imports.link13400a; |
| 2 | |
| 3 | struct BigInt |
| 4 | { |
| 5 | this(string s) {} |
| 6 | |
| 7 | // This template opEquals is determined to 'identity opEquals' by |
| 8 | // hasIdentityOpEquals() in clone.c with the speculative instantiation |
| 9 | // with dummy rvalue argument. |
| 10 | // Then BigInt.opEquals!().opEquals(const BigInt y) const pure is stored |
| 11 | // in template instance cache. |
| 12 | bool opEquals()(auto ref const BigInt y) const pure |
| 13 | { |
| 14 | return true; |
| 15 | } |
| 16 | } |