dmd/compiler/test/fail_compilation/fail222.d
Nick Treleaven bb638373d6
Fix Issue 15436 - Compiler still refers to AliasSeq-s as "tuple"-s (#15363)
* Fix Issue 15436 - Compiler still refers to AliasSeq-s as "tuple"-s

Replace "tuple type" with "type sequence".
Replace "tuple" with "sequence".
Pretty print `AliasSeq!(args)`, not `tuple(args)`.
Leave json as "tuple" for now.
Also mention std.typecons.Tuple when trying to return a sequence.

Note: This does not rename any internal compiler symbols.

* Update runnable tests

* Update stringof tests

* Update remaining tests

* retrigger tests
2023-06-30 11:02:00 +03:00

23 lines
698 B
D

/*
TEST_OUTPUT:
---
fail_compilation/fail222.d(11): Error: template `fail222.getMixin(TArg..., int i = 0)()` template sequence parameter must be the last one
fail_compilation/fail222.d(18): Error: template instance `getMixin!()` does not match template declaration `getMixin(TArg..., int i = 0)()`
fail_compilation/fail222.d(21): Error: template instance `fail222.Thing!()` error instantiating
fail_compilation/fail222.d(23): Error: template `fail222.fooBar(A..., B...)()` template sequence parameter must be the last one
---
*/
string getMixin(TArg..., int i = 0)()
{
return ``;
}
class Thing(TArg...)
{
mixin(getMixin!(TArg)());
}
public Thing!() stuff;
void fooBar (A..., B...)() {}