Skip to content

Commit 9f35bc5

Browse files
committed
[nfc][cxx-interop] Fix a few tests.
1 parent 3347235 commit 9f35bc5

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

test/Interop/Cxx/class/Inputs/type-classification.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ struct __attribute__((swift_attr("import_iterator"))) Iterator {
232232
};
233233

234234
struct HasMethodThatReturnsIterator {
235+
HasMethodThatReturnsIterator(const HasMethodThatReturnsIterator&);
235236
Iterator getIterator() const;
236237
};
237238

@@ -240,6 +241,7 @@ struct IteratorBox {
240241
};
241242

242243
struct HasMethodThatReturnsIteratorBox {
244+
HasMethodThatReturnsIteratorBox(const HasMethodThatReturnsIteratorBox&);
243245
IteratorBox getIteratorBox() const;
244246
};
245247

test/Interop/Cxx/stdlib/overlay/Inputs/custom-sequence.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,31 @@ struct HasTemplatedIterator {
108108

109109
typedef HasTemplatedIterator<int> HasUninstantiatableIterator;
110110

111-
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_CUSTOM_SEQUENCE_H
111+
struct HasInheritedConstIterator {
112+
private:
113+
InheritedConstIterator b = InheritedConstIterator(1);
114+
InheritedConstIterator e = InheritedConstIterator(6);
115+
116+
public:
117+
InheritedConstIterator begin() const { return b; }
118+
InheritedConstIterator end() const { return e; }
119+
};
120+
121+
template <typename T>
122+
struct HasInheritedTemplatedConstIterator {
123+
public:
124+
typedef InheritedTemplatedConstIterator<int> iterator;
125+
126+
private:
127+
iterator b = iterator(1);
128+
iterator e = iterator(7);
129+
130+
public:
131+
iterator begin() const { return b; }
132+
iterator end() const { return e; }
133+
};
134+
135+
typedef HasInheritedTemplatedConstIterator<int>
136+
HasInheritedTemplatedConstIteratorInt;
137+
138+
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_CUSTOM_SEQUENCE_H

0 commit comments

Comments
 (0)