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
This commit is contained in:
Nick Treleaven 2023-06-30 09:02:00 +01:00 committed by GitHub
parent dddefc01ea
commit bb638373d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 143 additions and 143 deletions

View file

@ -3695,7 +3695,7 @@ struct ASTBase
{ {
Expression e = (*exps)[i]; Expression e = (*exps)[i];
if (e.type.ty == Ttuple) if (e.type.ty == Ttuple)
e.error("cannot form tuple of tuples"); e.error("cannot form sequence of sequences");
auto arg = new Parameter(STC.undefined_, e.type, null, null, null); auto arg = new Parameter(STC.undefined_, e.type, null, null, null);
(*arguments)[i] = arg; (*arguments)[i] = arg;
} }

View file

@ -599,7 +599,7 @@ extern (C++) final class TupleDeclaration : Declaration
override const(char)* kind() const override const(char)* kind() const
{ {
return "tuple"; return "sequence";
} }
override Type getType() override Type getType()

View file

@ -2412,7 +2412,7 @@ public:
continue; continue;
if (ex.op == EXP.voidExpression) if (ex.op == EXP.voidExpression)
{ {
e.error("CTFE internal error: void element `%s` in tuple", exp.toChars()); e.error("CTFE internal error: void element `%s` in sequence", exp.toChars());
assert(0); assert(0);
} }

View file

@ -888,7 +888,7 @@ public:
buf.writeByte('V'); buf.writeByte('V');
if (ea.op == EXP.tuple) if (ea.op == EXP.tuple)
{ {
ea.error("tuple is not a valid template value argument"); ea.error("sequence is not a valid template value argument");
continue; continue;
} }
// Now that we know it is not an alias, we MUST obtain a value // Now that we know it is not an alias, we MUST obtain a value

View file

@ -695,7 +695,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
size_t tedim = te.exps.length; size_t tedim = te.exps.length;
if (tedim != nelems) if (tedim != nelems)
{ {
error(dsym.loc, "tuple of %d elements cannot be assigned to tuple of %d elements", cast(int)tedim, cast(int)nelems); error(dsym.loc, "sequence of %d elements cannot be assigned to sequence of %d elements", cast(int)tedim, cast(int)nelems);
for (size_t u = tedim; u < nelems; u++) // fill dummy expression for (size_t u = tedim; u < nelems; u++) // fill dummy expression
te.exps.push(ErrorExp.get()); te.exps.push(ErrorExp.get());
} }
@ -2044,7 +2044,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
{ {
} }
else else
ns.exp.error("compile time string constant (or tuple) expected, not `%s`", ns.exp.error("compile time string constant (or sequence) expected, not `%s`",
ns.exp.toChars()); ns.exp.toChars());
attribSemantic(ns); attribSemantic(ns);
} }
@ -2714,7 +2714,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
} }
if (i + 1 != tempdecl.parameters.length && tp.isTemplateTupleParameter()) if (i + 1 != tempdecl.parameters.length && tp.isTemplateTupleParameter())
{ {
tempdecl.error("template tuple parameter must be last one"); tempdecl.error("template sequence parameter must be the last one");
tempdecl.errors = true; tempdecl.errors = true;
} }
} }

View file

@ -7809,7 +7809,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
if (exp.to.ty == Ttuple) if (exp.to.ty == Ttuple)
{ {
exp.error("cannot cast `%s` of type `%s` to tuple type `%s`", exp.e1.toChars(), exp.e1.type.toChars(), exp.to.toChars()); exp.error("cannot cast `%s` of type `%s` to type sequence `%s`", exp.e1.toChars(), exp.e1.type.toChars(), exp.to.toChars());
return setError(); return setError();
} }
@ -8155,7 +8155,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
} }
if (!exp.lwr || !exp.upr) if (!exp.lwr || !exp.upr)
{ {
exp.error("need upper and lower bound to slice tuple"); exp.error("need upper and lower bound to slice a sequence");
return setError(); return setError();
} }
} }
@ -9200,7 +9200,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
Expression e = null; Expression e = null;
if (dim != tup2.exps.length) if (dim != tup2.exps.length)
{ {
exp.error("mismatched tuple lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.length); exp.error("mismatched sequence lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.length);
return setError(); return setError();
} }
if (dim == 0) if (dim == 0)

View file

@ -2217,13 +2217,13 @@ private void expressionPrettyPrint(Expression e, OutBuffer* buf, HdrGenState* hg
{ {
buf.writeByte('('); buf.writeByte('(');
e.e0.expressionPrettyPrint(buf, hgs); e.e0.expressionPrettyPrint(buf, hgs);
buf.writestring(", tuple("); buf.writestring(", AliasSeq!(");
argsToBuffer(e.exps, buf, hgs); argsToBuffer(e.exps, buf, hgs);
buf.writestring("))"); buf.writestring("))");
} }
else else
{ {
buf.writestring("tuple("); buf.writestring("AliasSeq!(");
argsToBuffer(e.exps, buf, hgs); argsToBuffer(e.exps, buf, hgs);
buf.writeByte(')'); buf.writeByte(')');
} }
@ -4141,7 +4141,7 @@ string EXPtoString(EXP op)
EXP.delegatePointer : "delegateptr", EXP.delegatePointer : "delegateptr",
EXP.delegateFunctionPointer : "delegatefuncptr", EXP.delegateFunctionPointer : "delegatefuncptr",
EXP.remove : "remove", EXP.remove : "remove",
EXP.tuple : "tuple", EXP.tuple : "sequence",
EXP.traits : "__traits", EXP.traits : "__traits",
EXP.overloadSet : "__overloadset", EXP.overloadSet : "__overloadset",
EXP.void_ : "void", EXP.void_ : "void",

View file

@ -2207,7 +2207,7 @@ private void asm_merge_opnds(ref OPND o1, ref OPND o2)
size_t index = cast(int)o2.disp; size_t index = cast(int)o2.disp;
if (index >= tup.objects.length) if (index >= tup.objects.length)
{ {
asmerr("tuple index `%llu` out of bounds `[0 .. %llu]`", asmerr("sequence index `%llu` out of bounds `[0 .. %llu]`",
cast(ulong) index, cast(ulong) tup.objects.length); cast(ulong) index, cast(ulong) tup.objects.length);
} }
else else

View file

@ -4940,7 +4940,7 @@ extern (C++) final class TypeFunction : TypeNext
} }
if (tb.ty == Ttuple) if (tb.ty == Ttuple)
{ {
error(loc, "functions cannot return a tuple"); error(loc, "functions cannot return a sequence (use `std.typecons.Tuple`)");
next = Type.terror; next = Type.terror;
} }
if (!isref && (tb.ty == Tstruct || tb.ty == Tsarray)) if (!isref && (tb.ty == Tstruct || tb.ty == Tsarray))
@ -6218,7 +6218,7 @@ extern (C++) final class TypeTuple : Type
{ {
Expression e = (*exps)[i]; Expression e = (*exps)[i];
if (e.type.ty == Ttuple) if (e.type.ty == Ttuple)
e.error("cannot form tuple of tuples"); e.error("cannot form sequence of sequences");
auto arg = new Parameter(STC.undefined_, e.type, null, null, null); auto arg = new Parameter(STC.undefined_, e.type, null, null, null);
(*arguments)[i] = arg; (*arguments)[i] = arg;
} }
@ -6273,7 +6273,7 @@ extern (C++) final class TypeTuple : Type
override const(char)* kind() const override const(char)* kind() const
{ {
return "tuple"; return "sequence";
} }
override TypeTuple syntaxCopy() override TypeTuple syntaxCopy()

View file

@ -1045,7 +1045,7 @@ Expression op_overload(Expression e, Scope* sc, EXP* pop = null)
size_t dim = tup1.exps.length; size_t dim = tup1.exps.length;
if (dim != tup2.exps.length) if (dim != tup2.exps.length)
{ {
e.error("mismatched tuple lengths, `%d` and `%d`", e.error("mismatched sequence lengths, `%d` and `%d`",
cast(int)dim, cast(int)tup2.exps.length); cast(int)dim, cast(int)tup2.exps.length);
return ErrorExp.get(); return ErrorExp.get();
} }

View file

@ -4298,7 +4298,7 @@ public auto makeTupleForeach(Scope* sc, bool isStatic, bool isDecl, ForeachState
const bool skipCheck = isStatic && needExpansion; const bool skipCheck = isStatic && needExpansion;
if (!skipCheck && (dim < 1 || dim > 2)) if (!skipCheck && (dim < 1 || dim > 2))
{ {
fs.error("only one (value) or two (key,value) arguments for tuple `foreach`"); fs.error("only one (value) or two (key,value) arguments allowed for sequence `foreach`");
return returnEarly(); return returnEarly();
} }

View file

@ -121,7 +121,7 @@ private void resolveTupleIndex(const ref Loc loc, Scope* sc, Dsymbol s, out Expr
const(uinteger_t) d = eindex.toUInteger(); const(uinteger_t) d = eindex.toUInteger();
if (d >= tup.objects.length) if (d >= tup.objects.length)
{ {
.error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong)tup.objects.length); .error(loc, "sequence index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong)tup.objects.length);
pt = Type.terror; pt = Type.terror;
return; return;
} }
@ -525,7 +525,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc)
uinteger_t d = mtype.dim.toUInteger(); uinteger_t d = mtype.dim.toUInteger();
if (d >= tup.objects.length) if (d >= tup.objects.length)
{ {
.error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tup.objects.length); .error(loc, "sequence index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tup.objects.length);
return error(); return error();
} }
@ -621,7 +621,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc)
uinteger_t d = mtype.dim.toUInteger(); uinteger_t d = mtype.dim.toUInteger();
if (d >= tt.arguments.length) if (d >= tt.arguments.length)
{ {
.error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tt.arguments.length); .error(loc, "sequence index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tt.arguments.length);
return error(); return error();
} }
Type telem = (*tt.arguments)[cast(size_t)d].type; Type telem = (*tt.arguments)[cast(size_t)d].type;
@ -1684,7 +1684,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc)
Type tbn = tn.toBasetype(); Type tbn = tn.toBasetype();
if (tbn.ty != Ttuple) if (tbn.ty != Ttuple)
{ {
.error(loc, "can only slice tuple types, not `%s`", tbn.toChars()); .error(loc, "can only slice type sequences, not `%s`", tbn.toChars());
return error(); return error();
} }
TypeTuple tt = cast(TypeTuple)tbn; TypeTuple tt = cast(TypeTuple)tbn;
@ -2436,7 +2436,7 @@ Expression getProperty(Type t, Scope* scope_, const ref Loc loc, Identifier iden
} }
else else
{ {
error(loc, "no property `%s` for tuple `%s`", ident.toChars(), mt.toChars()); error(loc, "no property `%s` for sequence `%s`", ident.toChars(), mt.toChars());
e = ErrorExp.get(); e = ErrorExp.get();
} }
return e; return e;
@ -2563,7 +2563,7 @@ void resolve(Type mt, const ref Loc loc, Scope* sc, out Expression pe, out Type
const d = mt.dim.toUInteger(); const d = mt.dim.toUInteger();
if (d >= tup.objects.length) if (d >= tup.objects.length)
{ {
error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong) tup.objects.length); error(loc, "sequence index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong) tup.objects.length);
return returnError(); return returnError();
} }

View file

@ -522,7 +522,7 @@ struct SafeS
int* p; int* p;
} }
} }
void test13x(@(10) int a, @(20) int, @(tuple(30), tuple(40)) int[] arr...); void test13x(@(10) int a, @(20) int, @(AliasSeq!(30), AliasSeq!(40)) int[] arr...);
enum Test14UDA1; enum Test14UDA1;
struct Test14UDA2 struct Test14UDA2
{ {

View file

@ -665,7 +665,7 @@ struct SafeS
int* p; int* p;
} }
} }
void test13x(@(10) int a, @(20) int, @(tuple(30), tuple(40)) int[] arr...) void test13x(@(10) int a, @(20) int, @(AliasSeq!(30), AliasSeq!(40)) int[] arr...)
{ {
} }
enum Test14UDA1; enum Test14UDA1;

View file

@ -7,7 +7,7 @@ template Seq(A...)
{ {
alias Seq = A; alias Seq = A;
} }
(int, int, int) a = tuple(1, 2, 3); (int, int, int) a = AliasSeq!(1, 2, 3);
template R(T) template R(T)
{ {
struct _R struct _R
@ -16,7 +16,7 @@ template R(T)
} }
} }
int x; int x;
static foreach (enum i; tuple(0, 1, 2)) static foreach (enum i; AliasSeq!(0, 1, 2))
{ {
mixin("int a" ~ i.stringof ~ " = 1;"); mixin("int a" ~ i.stringof ~ " = 1;");
} }

View file

@ -2,59 +2,59 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
100 tuple() 100 AliasSeq!()
101 tuple("return", "ref") 101 AliasSeq!("return", "ref")
102 tuple("ref") 102 AliasSeq!("ref")
103 tuple() 103 AliasSeq!()
104 tuple("ref") 104 AliasSeq!("ref")
105 tuple() 105 AliasSeq!()
106 tuple() 106 AliasSeq!()
107 tuple("ref") 107 AliasSeq!("ref")
108 tuple("ref") 108 AliasSeq!("ref")
109 tuple("ref") 109 AliasSeq!("ref")
110 tuple("ref") 110 AliasSeq!("ref")
111 tuple() 111 AliasSeq!()
112 tuple("ref") 112 AliasSeq!("ref")
113 tuple("ref") 113 AliasSeq!("ref")
114 tuple("ref") 114 AliasSeq!("ref")
115 tuple("ref") 115 AliasSeq!("ref")
116 tuple() 116 AliasSeq!()
117 tuple("ref") 117 AliasSeq!("ref")
118 tuple("ref") 118 AliasSeq!("ref")
119 tuple() 119 AliasSeq!()
120 tuple("ref") 120 AliasSeq!("ref")
121 tuple() 121 AliasSeq!()
122 tuple("ref") 122 AliasSeq!("ref")
123 tuple("in") 123 AliasSeq!("in")
124 tuple("in") 124 AliasSeq!("in")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("return", "ref") m AliasSeq!("return", "ref")
m-mixin tuple("return", "ref") m-mixin AliasSeq!("return", "ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple() m AliasSeq!()
m-mixin tuple() m-mixin AliasSeq!()
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("ref") m AliasSeq!("ref")
m-mixin tuple("ref") m-mixin AliasSeq!("ref")
m tuple("in") m AliasSeq!("in")
m-mixin tuple("in") m-mixin AliasSeq!("in")
--- ---
*/ */

View file

@ -3,7 +3,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
tuple("id", "toString", "toHash", "opCmp", "opEquals", "Monitor", "factory") AliasSeq!("id", "toString", "toHash", "opCmp", "opEquals", "Monitor", "factory")
genProps genProps
--- ---
*/ */

View file

@ -13,4 +13,4 @@ Tuple!T tuple(T...)(T args)
enum foo = tuple(1, 2).expand; enum foo = tuple(1, 2).expand;
static assert(typeof(foo).stringof == "(int, int)"); static assert(typeof(foo).stringof == "(int, int)");
static assert(foo.stringof == "tuple(1, 2)"); static assert(foo.stringof == "AliasSeq!(1, 2)");

View file

@ -28,5 +28,5 @@ interface ConnectionStream : Stream
void close(); void close();
} }
static assert(__traits(getOverloads, ConnectionStream, "connected").stringof == "tuple(connected)"); static assert(__traits(getOverloads, ConnectionStream, "connected").stringof == "AliasSeq!(connected)");
static assert(__traits(getOverloads, ConnectionStream, "close").stringof == "tuple(close)"); static assert(__traits(getOverloads, ConnectionStream, "close").stringof == "AliasSeq!(close)");

View file

@ -1,6 +1,6 @@
/* TEST_OUTPUT: /* TEST_OUTPUT:
--- ---
tuple((Attrib)) AliasSeq!((Attrib))
--- ---
*/ */

View file

@ -1,13 +1,13 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
tuple((A), (B)) AliasSeq!((A), (B))
tuple((A), (B), 0) AliasSeq!((A), (B), 0)
tuple((A), (B), (A)) AliasSeq!((A), (B), (A))
tuple((A), (B), (A), (B)) AliasSeq!((A), (B), (A), (B))
tuple((A), (B), (A), (B)) AliasSeq!((A), (B), (A), (B))
tuple((A), (B), (A), (B), (A), (B), (A), (B)) AliasSeq!((A), (B), (A), (B), (A), (B), (A), (B))
tuple((Attr)) AliasSeq!((Attr))
--- ---
*/ */

View file

@ -1,7 +1,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
tuple(func) AliasSeq!(func)
--- ---
*/ */
// https://issues.dlang.org/show_bug.cgi?id=21282 // https://issues.dlang.org/show_bug.cgi?id=21282

View file

@ -2,8 +2,8 @@
REQUIRED_ARGS: -unittest REQUIRED_ARGS: -unittest
TEST_OUTPUT: TEST_OUTPUT:
--- ---
tuple(__unittest_L14_C5_1, __unittest_L14_C5_2) AliasSeq!(__unittest_L14_C5_1, __unittest_L14_C5_2)
tuple(__unittest_L14_C5_2) AliasSeq!(__unittest_L14_C5_2)
--- ---
*/ */
// https://issues.dlang.org/show_bug.cgi?id=21330 // https://issues.dlang.org/show_bug.cgi?id=21330

View file

@ -1,9 +1,9 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/casttuple.d(104): Error: cannot cast `__tup1_field_0` of type `int` to tuple type `(string)` fail_compilation/casttuple.d(104): Error: cannot cast `__tup1_field_0` of type `int` to type sequence `(string)`
fail_compilation/casttuple.d(107): Error: cannot cast `tuple(__tup2_field_0, __tup2_field_1)` of type `(int, int)` to tuple type `(string, string)` fail_compilation/casttuple.d(107): Error: cannot cast `AliasSeq!(__tup2_field_0, __tup2_field_1)` of type `(int, int)` to type sequence `(string, string)`
fail_compilation/casttuple.d(111): Error: cannot cast `tuple(foo, 123)` of type `(int, int)` to tuple type `(string, string)` fail_compilation/casttuple.d(111): Error: cannot cast `AliasSeq!(foo, 123)` of type `(int, int)` to type sequence `(string, string)`
--- ---
*/ */

View file

@ -3,7 +3,7 @@ TEST_OUTPUT:
--- ---
fail_compilation/cppmangle.d(11): Error: expected valid identifier for C++ namespace but got `` fail_compilation/cppmangle.d(11): Error: expected valid identifier for C++ namespace but got ``
fail_compilation/cppmangle.d(15): Error: expected valid identifier for C++ namespace but got `0num` fail_compilation/cppmangle.d(15): Error: expected valid identifier for C++ namespace but got `0num`
fail_compilation/cppmangle.d(19): Error: compile time string constant (or tuple) expected, not `2` fail_compilation/cppmangle.d(19): Error: compile time string constant (or sequence) expected, not `2`
fail_compilation/cppmangle.d(23): Error: expected valid identifier for C++ namespace but got `invalid@namespace` fail_compilation/cppmangle.d(23): Error: expected valid identifier for C++ namespace but got `invalid@namespace`
--- ---
*/ */

View file

@ -2,7 +2,7 @@
REQUIRED_ARGS: -checkaction=context REQUIRED_ARGS: -checkaction=context
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/dassert.d(14): Error: expression `tuple(0, 0)` of type `(int, int)` does not have a boolean value fail_compilation/dassert.d(14): Error: expression `AliasSeq!(0, 0)` of type `(int, int)` does not have a boolean value
fail_compilation/dassert.d(21): Error: assignment cannot be used as a condition, perhaps `==` was meant? fail_compilation/dassert.d(21): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/dassert.d(29): Error: assignment cannot be used as a condition, perhaps `==` was meant? fail_compilation/dassert.d(29): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/dassert.d(40): Error: expression `issue()` of type `void` does not have a boolean value fail_compilation/dassert.d(40): Error: expression `issue()` of type `void` does not have a boolean value

View file

@ -1,7 +1,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/diag13884.d(14): Error: functions cannot return a tuple fail_compilation/diag13884.d(14): Error: functions cannot return a sequence (use `std.typecons.Tuple`)
fail_compilation/diag13884.d(21): instantiated from here: `MapResult!((t) => t.tupleof, Foo[])` fail_compilation/diag13884.d(21): instantiated from here: `MapResult!((t) => t.tupleof, Foo[])`
fail_compilation/diag13884.d(14): instantiated from here: `map!(Foo[])` fail_compilation/diag13884.d(14): instantiated from here: `map!(Foo[])`
--- ---

View file

@ -8,7 +8,7 @@ fail_compilation/diag14876.d(20): Deprecation: class `diag14876.Dep` is deprecat
fail_compilation/diag14876.d(21): Deprecation: class `diag14876.Dep` is deprecated fail_compilation/diag14876.d(21): Deprecation: class `diag14876.Dep` is deprecated
fail_compilation/diag14876.d(22): Deprecation: class `diag14876.Dep` is deprecated fail_compilation/diag14876.d(22): Deprecation: class `diag14876.Dep` is deprecated
fail_compilation/diag14876.d(23): Deprecation: class `diag14876.Dep` is deprecated fail_compilation/diag14876.d(23): Deprecation: class `diag14876.Dep` is deprecated
fail_compilation/diag14876.d(23): Error: can only slice tuple types, not `diag14876.Dep` fail_compilation/diag14876.d(23): Error: can only slice type sequences, not `diag14876.Dep`
--- ---
*/ */

View file

@ -12,7 +12,7 @@ alias Tuple!(int, int) TupleType;
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/fail12436.d(18): Error: functions cannot return a function fail_compilation/fail12436.d(18): Error: functions cannot return a function
fail_compilation/fail12436.d(19): Error: functions cannot return a tuple fail_compilation/fail12436.d(19): Error: functions cannot return a sequence (use `std.typecons.Tuple`)
--- ---
*/ */
FuncType test1(); FuncType test1();

View file

@ -1,7 +1,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/fail15755.d(28): Error: `tuple(123)` has no effect fail_compilation/fail15755.d(28): Error: `AliasSeq!(123)` has no effect
--- ---
*/ */

View file

@ -1,10 +1,10 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/fail222.d(11): Error: template `fail222.getMixin(TArg..., int i = 0)()` template tuple parameter must be last one 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(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(21): Error: template instance `fail222.Thing!()` error instantiating
fail_compilation/fail222.d(23): Error: template `fail222.fooBar(A..., B...)()` template tuple parameter must be last one fail_compilation/fail222.d(23): Error: template `fail222.fooBar(A..., B...)()` template sequence parameter must be the last one
--- ---
*/ */

View file

@ -1,7 +1,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/ice12574.d(40): Error: tuple index `2` out of bounds `[0 .. 2]` fail_compilation/ice12574.d(40): Error: sequence index `2` out of bounds `[0 .. 2]`
fail_compilation/ice12574.d(53): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating fail_compilation/ice12574.d(53): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating
--- ---
*/ */

View file

@ -3,7 +3,7 @@
/* /*
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/ice14424.d(13): Error: `tuple(__unittest_L3_C1)` has no effect fail_compilation/ice14424.d(13): Error: `AliasSeq!(__unittest_L3_C1)` has no effect
--- ---
*/ */

View file

@ -2,7 +2,7 @@
TEST_OUTPUT: TEST_OUTPUT:
--- ---
fail_compilation/typeerrors.d(32): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site. fail_compilation/typeerrors.d(32): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
fail_compilation/typeerrors.d(37): Error: tuple index `4` out of bounds `[0 .. 4]` fail_compilation/typeerrors.d(37): Error: sequence index `4` out of bounds `[0 .. 4]`
fail_compilation/typeerrors.d(39): Error: variable `x` cannot be read at compile time fail_compilation/typeerrors.d(39): Error: variable `x` cannot be read at compile time
fail_compilation/typeerrors.d(40): Error: cannot have array of `void()` fail_compilation/typeerrors.d(40): Error: cannot have array of `void()`
fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C` fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C`

View file

@ -2,30 +2,30 @@
EXTRA_FILES: imports/a9741.d EXTRA_FILES: imports/a9741.d
TEST_OUTPUT: TEST_OUTPUT:
--- ---
tuple(3, 4, 7, (SSS)) AliasSeq!(3, 4, 7, (SSS))
tuple(3, 4, 7, (SSS)) AliasSeq!(3, 4, 7, (SSS))
7 7
SSS SSS
tuple("hello") AliasSeq!("hello")
tuple('c') AliasSeq!('c')
tuple((FFF)) AliasSeq!((FFF))
tuple(10) AliasSeq!(10)
tuple(20) AliasSeq!(20)
tuple(30) AliasSeq!(30)
tuple((Test6)) AliasSeq!((Test6))
tuple(Test7(3, "foo")) AliasSeq!(Test7(3, "foo"))
tuple((Test8!"foo")) AliasSeq!((Test8!"foo"))
tuple((Test9!"foo")) AliasSeq!((Test9!"foo"))
tuple(Test10(3)) AliasSeq!(Test10(3))
tuple(Test11(3)) AliasSeq!(Test11(3))
tuple(10) AliasSeq!(10)
tuple(20) AliasSeq!(20)
tuple() AliasSeq!()
tuple(40) AliasSeq!(40)
B9741 B9741
tuple((A9741)) AliasSeq!((A9741))
tuple(1) AliasSeq!(1)
tuple(2) AliasSeq!(2)
--- ---
RUN_OUTPUT: RUN_OUTPUT:

View file

@ -13,17 +13,17 @@ runnable/xtest46.d(2964): Deprecation: alias this for classes/interfaces is depr
int(int i, long j = 7L) int(int i, long j = 7L)
long long
C10390(C10390(C10390(<recursion>))) C10390(C10390(C10390(<recursion>)))
tuple(height) AliasSeq!(height)
tuple(get, get) AliasSeq!(get, get)
tuple(clear) AliasSeq!(clear)
tuple(draw, draw) AliasSeq!(draw, draw)
const(int) const(int)
string[] string[]
double[] double[]
double[] double[]
{} {}
runnable/xtest46.d(4670): Deprecation: alias this for classes/interfaces is deprecated runnable/xtest46.d(4670): Deprecation: alias this for classes/interfaces is deprecated
tuple("m") AliasSeq!("m")
true true
TFunction1: extern (C) void function() TFunction1: extern (C) void function()
--- ---

View file

@ -14,17 +14,17 @@ runnable/xtest46_gc.d-mixin-33(2996): Deprecation: alias this for classes/interf
int(int i, long j = 7L) int(int i, long j = 7L)
long long
C10390(C10390(<recursion>)) C10390(C10390(<recursion>))
tuple(height) AliasSeq!(height)
tuple(get, get) AliasSeq!(get, get)
tuple(clear) AliasSeq!(clear)
tuple(draw, draw) AliasSeq!(draw, draw)
const(int) const(int)
string[] string[]
double[] double[]
double[] double[]
{} {}
runnable/xtest46_gc.d-mixin-33(4702): Deprecation: alias this for classes/interfaces is deprecated runnable/xtest46_gc.d-mixin-33(4702): Deprecation: alias this for classes/interfaces is deprecated
tuple("m") AliasSeq!("m")
true true
TFunction1: extern (C) void function() TFunction1: extern (C) void function()
--- ---