Skip to content

Commit 3754f4b

Browse files
authored
Merge pull request #25941 from slavapestov/fix-invalid-method-override
Fix invalid method overrides in StdlibCollectionUnittest
2 parents b6e072b + 7cc4be4 commit 3754f4b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

stdlib/private/StdlibCollectionUnittest/LoggingWrappers.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ extension LoggingIterator: IteratorProtocol {
7373
// since Log is an associated type that cannot be refined in extensions
7474
// that add functionality.
7575

76-
public class SequenceLog {
76+
public class SequenceLogBase {
7777
// Sequence
7878
public static var makeIterator = TypeIndexed(0)
7979
public static var underestimatedCount = TypeIndexed(0)
@@ -133,33 +133,35 @@ public class SequenceLog {
133133
public static var removeSubrange = TypeIndexed(0)
134134
public static var replaceSubrange = TypeIndexed(0)
135135
public static var reserveCapacity = TypeIndexed(0)
136+
}
136137

137-
public class func dispatchTester<S>(
138+
public class SequenceLog : SequenceLogBase {
139+
public static func dispatchTester<S>(
138140
_ s: S
139141
) -> LoggingSequence<LoggingSequence<S>> {
140142
return LoggingSequence(wrapping: LoggingSequence(wrapping: s))
141143
}
142144
}
143145

144-
public class CollectionLog : SequenceLog {
145-
public override class func dispatchTester<C>(
146+
public class CollectionLog : SequenceLogBase {
147+
public static func dispatchTester<C>(
146148
_ c: C
147149
) -> LoggingCollection<LoggingCollection<C>> {
148150
return LoggingCollection(wrapping: LoggingCollection(wrapping: c))
149151
}
150152
}
151153

152-
public class BidirectionalCollectionLog : CollectionLog {
153-
public override class func dispatchTester<C>(
154+
public class BidirectionalCollectionLog : SequenceLogBase {
155+
public static func dispatchTester<C>(
154156
_ c: C
155157
) -> LoggingBidirectionalCollection<LoggingBidirectionalCollection<C>> {
156158
return LoggingBidirectionalCollection(
157159
wrapping: LoggingBidirectionalCollection(wrapping: c))
158160
}
159161
}
160162

161-
public class MutableCollectionLog : CollectionLog {
162-
public override class func dispatchTester<C>(
163+
public class MutableCollectionLog : SequenceLogBase {
164+
public static func dispatchTester<C>(
163165
_ c: C
164166
) -> LoggingMutableCollection<LoggingMutableCollection<C>> {
165167
return LoggingMutableCollection(
@@ -171,8 +173,8 @@ public class MutableCollectionLog : CollectionLog {
171173
/// of `RangeReplaceableCollection`.
172174
///
173175
/// Each static variable is a mapping of Type -> Number of calls.
174-
public class RangeReplaceableCollectionLog : CollectionLog {
175-
public override class func dispatchTester<C>(
176+
public class RangeReplaceableCollectionLog : SequenceLogBase {
177+
public static func dispatchTester<C>(
176178
_ rrc: C
177179
) -> LoggingRangeReplaceableCollection<LoggingRangeReplaceableCollection<C>> {
178180
return LoggingRangeReplaceableCollection(

0 commit comments

Comments
 (0)