Skip to content

Commit 05ded06

Browse files
committed
1 parent a9e35ed commit 05ded06

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

test/Generics/sr15792_2.swift

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// RUN: %target-swift-frontend -typecheck %s
2+
3+
// Reduced from Realm open source project: https://github.com/realm/realm-swift.git
4+
5+
internal protocol RealmCollectionImpl: RealmCollection where Index == Int, SubSequence == Slice<Self> {}
6+
7+
public protocol RealmCollection: RealmCollectionBase, Equatable {}
8+
9+
public protocol RealmCollectionBase: RandomAccessCollection, LazyCollectionProtocol, CustomStringConvertible, ThreadConfined where Element: RealmCollectionValue {
10+
typealias ElementType = Element
11+
}
12+
13+
public protocol RealmCollectionValue: Hashable, _HasPersistedType where PersistedType: RealmCollectionValue {}
14+
15+
public protocol _HasPersistedType: _ObjcBridgeable {
16+
associatedtype PersistedType: _ObjcBridgeable
17+
}
18+
19+
public protocol _ObjcBridgeable {}
20+
21+
public protocol ThreadConfined {}
22+
23+
public protocol PersistableEnum: _PersistableInsideOptional, RawRepresentable, CaseIterable, RealmEnum, _RealmCollectionValueInsideOptional, MinMaxType, Comparable where RawValue: Comparable {}
24+
25+
public protocol _PersistableInsideOptional: _Persistable where PersistedType: _PersistableInsideOptional {}
26+
27+
public protocol _Persistable: _RealmSchemaDiscoverable, _HasPersistedType where PersistedType: _Persistable, PersistedType.PersistedType.PersistedType == PersistedType.PersistedType {}
28+
29+
public protocol RealmEnum: RealmOptionalType, _RealmSchemaDiscoverable {}
30+
31+
public protocol _RealmCollectionValueInsideOptional: RealmCollectionValue where PersistedType: _RealmCollectionValueInsideOptional {}
32+
33+
public protocol MinMaxType {}
34+
35+
public protocol _RealmSchemaDiscoverable {}
36+
37+
public protocol RealmOptionalType: _ObjcBridgeable {}

0 commit comments

Comments
 (0)