gcc/testsuite/gdc.test/compilable/a3682.d
raw| 1 | // COMPILED_IMPORTS: imports/b3682.d |
| 2 | // PERMUTE_ARGS: |
| 3 | |
| 4 | // https://issues.dlang.org/show_bug.cgi?id=3682 |
| 5 | |
| 6 | struct Tuple(Types...) |
| 7 | { |
| 8 | Tuple!(Types[0..1]) slice()() |
| 9 | { |
| 10 | Tuple!(Types[0..1]) x; |
| 11 | return x; |
| 12 | } |
| 13 | |
| 14 | void fail() |
| 15 | { |
| 16 | Tuple!(float, double, int) a; |
| 17 | auto s = a.slice(); |
| 18 | static assert(is(typeof(s) == Tuple!(float))); |
| 19 | } |
| 20 | } |