mirror of
https://github.com/dlang/dmd.git
synced 2025-04-29 22:50:27 +03:00
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:
parent
dddefc01ea
commit
bb638373d6
37 changed files with 143 additions and 143 deletions
|
@ -3695,7 +3695,7 @@ struct ASTBase
|
|||
{
|
||||
Expression e = (*exps)[i];
|
||||
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);
|
||||
(*arguments)[i] = arg;
|
||||
}
|
||||
|
|
|
@ -599,7 +599,7 @@ extern (C++) final class TupleDeclaration : Declaration
|
|||
|
||||
override const(char)* kind() const
|
||||
{
|
||||
return "tuple";
|
||||
return "sequence";
|
||||
}
|
||||
|
||||
override Type getType()
|
||||
|
|
|
@ -2412,7 +2412,7 @@ public:
|
|||
continue;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -888,7 +888,7 @@ public:
|
|||
buf.writeByte('V');
|
||||
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;
|
||||
}
|
||||
// Now that we know it is not an alias, we MUST obtain a value
|
||||
|
|
|
@ -695,7 +695,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
|||
size_t tedim = te.exps.length;
|
||||
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
|
||||
te.exps.push(ErrorExp.get());
|
||||
}
|
||||
|
@ -2044,7 +2044,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
|||
{
|
||||
}
|
||||
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());
|
||||
attribSemantic(ns);
|
||||
}
|
||||
|
@ -2714,7 +2714,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7809,7 +7809,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
|||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -8155,7 +8155,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
|||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -9200,7 +9200,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
|||
Expression e = null;
|
||||
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();
|
||||
}
|
||||
if (dim == 0)
|
||||
|
|
|
@ -2217,13 +2217,13 @@ private void expressionPrettyPrint(Expression e, OutBuffer* buf, HdrGenState* hg
|
|||
{
|
||||
buf.writeByte('(');
|
||||
e.e0.expressionPrettyPrint(buf, hgs);
|
||||
buf.writestring(", tuple(");
|
||||
buf.writestring(", AliasSeq!(");
|
||||
argsToBuffer(e.exps, buf, hgs);
|
||||
buf.writestring("))");
|
||||
}
|
||||
else
|
||||
{
|
||||
buf.writestring("tuple(");
|
||||
buf.writestring("AliasSeq!(");
|
||||
argsToBuffer(e.exps, buf, hgs);
|
||||
buf.writeByte(')');
|
||||
}
|
||||
|
@ -4141,7 +4141,7 @@ string EXPtoString(EXP op)
|
|||
EXP.delegatePointer : "delegateptr",
|
||||
EXP.delegateFunctionPointer : "delegatefuncptr",
|
||||
EXP.remove : "remove",
|
||||
EXP.tuple : "tuple",
|
||||
EXP.tuple : "sequence",
|
||||
EXP.traits : "__traits",
|
||||
EXP.overloadSet : "__overloadset",
|
||||
EXP.void_ : "void",
|
||||
|
|
|
@ -2207,7 +2207,7 @@ private void asm_merge_opnds(ref OPND o1, ref OPND o2)
|
|||
size_t index = cast(int)o2.disp;
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4940,7 +4940,7 @@ extern (C++) final class TypeFunction : TypeNext
|
|||
}
|
||||
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;
|
||||
}
|
||||
if (!isref && (tb.ty == Tstruct || tb.ty == Tsarray))
|
||||
|
@ -6218,7 +6218,7 @@ extern (C++) final class TypeTuple : Type
|
|||
{
|
||||
Expression e = (*exps)[i];
|
||||
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);
|
||||
(*arguments)[i] = arg;
|
||||
}
|
||||
|
@ -6273,7 +6273,7 @@ extern (C++) final class TypeTuple : Type
|
|||
|
||||
override const(char)* kind() const
|
||||
{
|
||||
return "tuple";
|
||||
return "sequence";
|
||||
}
|
||||
|
||||
override TypeTuple syntaxCopy()
|
||||
|
|
|
@ -1045,7 +1045,7 @@ Expression op_overload(Expression e, Scope* sc, EXP* pop = null)
|
|||
size_t dim = tup1.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);
|
||||
return ErrorExp.get();
|
||||
}
|
||||
|
|
|
@ -4298,7 +4298,7 @@ public auto makeTupleForeach(Scope* sc, bool isStatic, bool isDecl, ForeachState
|
|||
const bool skipCheck = isStatic && needExpansion;
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ private void resolveTupleIndex(const ref Loc loc, Scope* sc, Dsymbol s, out Expr
|
|||
const(uinteger_t) d = eindex.toUInteger();
|
||||
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;
|
||||
return;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc)
|
|||
uinteger_t d = mtype.dim.toUInteger();
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc)
|
|||
uinteger_t d = mtype.dim.toUInteger();
|
||||
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();
|
||||
}
|
||||
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();
|
||||
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();
|
||||
}
|
||||
TypeTuple tt = cast(TypeTuple)tbn;
|
||||
|
@ -2436,7 +2436,7 @@ Expression getProperty(Type t, Scope* scope_, const ref Loc loc, Identifier iden
|
|||
}
|
||||
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();
|
||||
}
|
||||
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();
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@ struct SafeS
|
|||
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;
|
||||
struct Test14UDA2
|
||||
{
|
||||
|
|
|
@ -665,7 +665,7 @@ struct SafeS
|
|||
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;
|
||||
|
|
|
@ -7,7 +7,7 @@ template Seq(A...)
|
|||
{
|
||||
alias Seq = A;
|
||||
}
|
||||
(int, int, int) a = tuple(1, 2, 3);
|
||||
(int, int, int) a = AliasSeq!(1, 2, 3);
|
||||
template R(T)
|
||||
{
|
||||
struct _R
|
||||
|
@ -16,7 +16,7 @@ template R(T)
|
|||
}
|
||||
}
|
||||
int x;
|
||||
static foreach (enum i; tuple(0, 1, 2))
|
||||
static foreach (enum i; AliasSeq!(0, 1, 2))
|
||||
{
|
||||
mixin("int a" ~ i.stringof ~ " = 1;");
|
||||
}
|
||||
|
|
|
@ -2,59 +2,59 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
100 tuple()
|
||||
101 tuple("return", "ref")
|
||||
102 tuple("ref")
|
||||
103 tuple()
|
||||
104 tuple("ref")
|
||||
105 tuple()
|
||||
106 tuple()
|
||||
107 tuple("ref")
|
||||
108 tuple("ref")
|
||||
109 tuple("ref")
|
||||
110 tuple("ref")
|
||||
111 tuple()
|
||||
112 tuple("ref")
|
||||
113 tuple("ref")
|
||||
114 tuple("ref")
|
||||
115 tuple("ref")
|
||||
116 tuple()
|
||||
117 tuple("ref")
|
||||
118 tuple("ref")
|
||||
119 tuple()
|
||||
120 tuple("ref")
|
||||
121 tuple()
|
||||
122 tuple("ref")
|
||||
123 tuple("in")
|
||||
124 tuple("in")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("return", "ref")
|
||||
m-mixin tuple("return", "ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple()
|
||||
m-mixin tuple()
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("ref")
|
||||
m-mixin tuple("ref")
|
||||
m tuple("in")
|
||||
m-mixin tuple("in")
|
||||
100 AliasSeq!()
|
||||
101 AliasSeq!("return", "ref")
|
||||
102 AliasSeq!("ref")
|
||||
103 AliasSeq!()
|
||||
104 AliasSeq!("ref")
|
||||
105 AliasSeq!()
|
||||
106 AliasSeq!()
|
||||
107 AliasSeq!("ref")
|
||||
108 AliasSeq!("ref")
|
||||
109 AliasSeq!("ref")
|
||||
110 AliasSeq!("ref")
|
||||
111 AliasSeq!()
|
||||
112 AliasSeq!("ref")
|
||||
113 AliasSeq!("ref")
|
||||
114 AliasSeq!("ref")
|
||||
115 AliasSeq!("ref")
|
||||
116 AliasSeq!()
|
||||
117 AliasSeq!("ref")
|
||||
118 AliasSeq!("ref")
|
||||
119 AliasSeq!()
|
||||
120 AliasSeq!("ref")
|
||||
121 AliasSeq!()
|
||||
122 AliasSeq!("ref")
|
||||
123 AliasSeq!("in")
|
||||
124 AliasSeq!("in")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("return", "ref")
|
||||
m-mixin AliasSeq!("return", "ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!()
|
||||
m-mixin AliasSeq!()
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("ref")
|
||||
m-mixin AliasSeq!("ref")
|
||||
m AliasSeq!("in")
|
||||
m-mixin AliasSeq!("in")
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
tuple("id", "toString", "toHash", "opCmp", "opEquals", "Monitor", "factory")
|
||||
AliasSeq!("id", "toString", "toHash", "opCmp", "opEquals", "Monitor", "factory")
|
||||
genProps
|
||||
---
|
||||
*/
|
||||
|
|
|
@ -13,4 +13,4 @@ Tuple!T tuple(T...)(T args)
|
|||
|
||||
enum foo = tuple(1, 2).expand;
|
||||
static assert(typeof(foo).stringof == "(int, int)");
|
||||
static assert(foo.stringof == "tuple(1, 2)");
|
||||
static assert(foo.stringof == "AliasSeq!(1, 2)");
|
||||
|
|
|
@ -28,5 +28,5 @@ interface ConnectionStream : Stream
|
|||
void close();
|
||||
}
|
||||
|
||||
static assert(__traits(getOverloads, ConnectionStream, "connected").stringof == "tuple(connected)");
|
||||
static assert(__traits(getOverloads, ConnectionStream, "close").stringof == "tuple(close)");
|
||||
static assert(__traits(getOverloads, ConnectionStream, "connected").stringof == "AliasSeq!(connected)");
|
||||
static assert(__traits(getOverloads, ConnectionStream, "close").stringof == "AliasSeq!(close)");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* TEST_OUTPUT:
|
||||
---
|
||||
tuple((Attrib))
|
||||
AliasSeq!((Attrib))
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
tuple((A), (B))
|
||||
tuple((A), (B), 0)
|
||||
tuple((A), (B), (A))
|
||||
tuple((A), (B), (A), (B))
|
||||
tuple((A), (B), (A), (B))
|
||||
tuple((A), (B), (A), (B), (A), (B), (A), (B))
|
||||
tuple((Attr))
|
||||
AliasSeq!((A), (B))
|
||||
AliasSeq!((A), (B), 0)
|
||||
AliasSeq!((A), (B), (A))
|
||||
AliasSeq!((A), (B), (A), (B))
|
||||
AliasSeq!((A), (B), (A), (B))
|
||||
AliasSeq!((A), (B), (A), (B), (A), (B), (A), (B))
|
||||
AliasSeq!((Attr))
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
tuple(func)
|
||||
AliasSeq!(func)
|
||||
---
|
||||
*/
|
||||
// https://issues.dlang.org/show_bug.cgi?id=21282
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
REQUIRED_ARGS: -unittest
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
tuple(__unittest_L14_C5_1, __unittest_L14_C5_2)
|
||||
tuple(__unittest_L14_C5_2)
|
||||
AliasSeq!(__unittest_L14_C5_1, __unittest_L14_C5_2)
|
||||
AliasSeq!(__unittest_L14_C5_2)
|
||||
---
|
||||
*/
|
||||
// https://issues.dlang.org/show_bug.cgi?id=21330
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/casttuple.d(104): Error: cannot cast `__tup1_field_0` of type `int` to tuple type `(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(111): Error: cannot cast `tuple(foo, 123)` of type `(int, int)` to tuple type `(string, 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 `AliasSeq!(__tup2_field_0, __tup2_field_1)` of type `(int, int)` to type sequence `(string, string)`
|
||||
fail_compilation/casttuple.d(111): Error: cannot cast `AliasSeq!(foo, 123)` of type `(int, int)` to type sequence `(string, string)`
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ TEST_OUTPUT:
|
|||
---
|
||||
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(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`
|
||||
---
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
REQUIRED_ARGS: -checkaction=context
|
||||
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(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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
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(14): instantiated from here: `map!(Foo[])`
|
||||
---
|
||||
|
|
|
@ -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(22): 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`
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ alias Tuple!(int, int) TupleType;
|
|||
TEST_OUTPUT:
|
||||
---
|
||||
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();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail15755.d(28): Error: `tuple(123)` has no effect
|
||||
fail_compilation/fail15755.d(28): Error: `AliasSeq!(123)` has no effect
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
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(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
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
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
|
||||
---
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
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
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
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(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(40): Error: cannot have array of `void()`
|
||||
fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C`
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
EXTRA_FILES: imports/a9741.d
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
tuple(3, 4, 7, (SSS))
|
||||
tuple(3, 4, 7, (SSS))
|
||||
AliasSeq!(3, 4, 7, (SSS))
|
||||
AliasSeq!(3, 4, 7, (SSS))
|
||||
7
|
||||
SSS
|
||||
tuple("hello")
|
||||
tuple('c')
|
||||
tuple((FFF))
|
||||
tuple(10)
|
||||
tuple(20)
|
||||
tuple(30)
|
||||
tuple((Test6))
|
||||
tuple(Test7(3, "foo"))
|
||||
tuple((Test8!"foo"))
|
||||
tuple((Test9!"foo"))
|
||||
tuple(Test10(3))
|
||||
tuple(Test11(3))
|
||||
tuple(10)
|
||||
tuple(20)
|
||||
tuple()
|
||||
tuple(40)
|
||||
AliasSeq!("hello")
|
||||
AliasSeq!('c')
|
||||
AliasSeq!((FFF))
|
||||
AliasSeq!(10)
|
||||
AliasSeq!(20)
|
||||
AliasSeq!(30)
|
||||
AliasSeq!((Test6))
|
||||
AliasSeq!(Test7(3, "foo"))
|
||||
AliasSeq!((Test8!"foo"))
|
||||
AliasSeq!((Test9!"foo"))
|
||||
AliasSeq!(Test10(3))
|
||||
AliasSeq!(Test11(3))
|
||||
AliasSeq!(10)
|
||||
AliasSeq!(20)
|
||||
AliasSeq!()
|
||||
AliasSeq!(40)
|
||||
B9741
|
||||
tuple((A9741))
|
||||
tuple(1)
|
||||
tuple(2)
|
||||
AliasSeq!((A9741))
|
||||
AliasSeq!(1)
|
||||
AliasSeq!(2)
|
||||
---
|
||||
|
||||
RUN_OUTPUT:
|
||||
|
|
|
@ -13,17 +13,17 @@ runnable/xtest46.d(2964): Deprecation: alias this for classes/interfaces is depr
|
|||
int(int i, long j = 7L)
|
||||
long
|
||||
C10390(C10390(C10390(<recursion>)))
|
||||
tuple(height)
|
||||
tuple(get, get)
|
||||
tuple(clear)
|
||||
tuple(draw, draw)
|
||||
AliasSeq!(height)
|
||||
AliasSeq!(get, get)
|
||||
AliasSeq!(clear)
|
||||
AliasSeq!(draw, draw)
|
||||
const(int)
|
||||
string[]
|
||||
double[]
|
||||
double[]
|
||||
{}
|
||||
runnable/xtest46.d(4670): Deprecation: alias this for classes/interfaces is deprecated
|
||||
tuple("m")
|
||||
AliasSeq!("m")
|
||||
true
|
||||
TFunction1: extern (C) void function()
|
||||
---
|
||||
|
|
|
@ -14,17 +14,17 @@ runnable/xtest46_gc.d-mixin-33(2996): Deprecation: alias this for classes/interf
|
|||
int(int i, long j = 7L)
|
||||
long
|
||||
C10390(C10390(<recursion>))
|
||||
tuple(height)
|
||||
tuple(get, get)
|
||||
tuple(clear)
|
||||
tuple(draw, draw)
|
||||
AliasSeq!(height)
|
||||
AliasSeq!(get, get)
|
||||
AliasSeq!(clear)
|
||||
AliasSeq!(draw, draw)
|
||||
const(int)
|
||||
string[]
|
||||
double[]
|
||||
double[]
|
||||
{}
|
||||
runnable/xtest46_gc.d-mixin-33(4702): Deprecation: alias this for classes/interfaces is deprecated
|
||||
tuple("m")
|
||||
AliasSeq!("m")
|
||||
true
|
||||
TFunction1: extern (C) void function()
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue