File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1049,12 +1049,12 @@ class TypeDecoder {
10491049 return *optError;
10501050 }
10511051
1052- // Unwrap one-element tuples.
1052+ // Unwrap unlabeled one-element tuples.
10531053 //
10541054 // FIXME: The behavior of one-element labeled tuples is inconsistent throughout
10551055 // the different re-implementations of type substitution and pack expansion.
1056- // if (elements.size() == 1)
1057- // return elements[0];
1056+ if (elements.size () == 1 && labels[ 0 ]. empty () )
1057+ return elements[0 ];
10581058
10591059 return Builder.createTupleType (elements, labels);
10601060 }
Original file line number Diff line number Diff line change @@ -63,13 +63,11 @@ conformances.test("tupleWitnesses") {
6363
6464conformances. test ( " singletonTupleWitnesses " ) {
6565 let g1 = SingletonTupleWitnesses< Bool> . self
66- // FIXME: Unwrap one-element tuples
67- // expectEqual(Bool.self, getA(g1))
66+ expectEqual ( Bool . self, getA ( g1) )
6867
6968 let g2 = SingletonTupleWitnesses< > . self
70- // FIXME: Unwrap one-element tuples
71- // expectEqual(Int.self, getB(g2))
72- // expectEqual(Int.self, getC(g2))
69+ expectEqual ( Int . self, getB ( g2) )
70+ expectEqual ( Int . self, getC ( g2) )
7371}
7472
7573conformances. test ( " functionWitnesses " ) {
You can’t perform that action at this time.
0 commit comments