mirror of
https://github.com/dlang/dmd.git
synced 2025-05-10 14:07:57 +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
|
@ -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
|
||||
{
|
||||
|
@ -559,4 +559,4 @@ interface I12344
|
|||
assert(result > 0);
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue