File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Swift 5.0
33
33
34
34
Runtime query of conditional conformances is now implemented. Therefore,
35
35
a dynamic cast such as `value as? P`, where the dynamic type of `value`
36
- conditional conforms to `P`, will succeed when the conditional
36
+ conditionally conforms to `P`, will succeed when the conditional
37
37
requirements are met.
38
38
39
39
Swift 4.1
Original file line number Diff line number Diff line change @@ -120,8 +120,8 @@ enum class LocalDeclContextKind : uint8_t {
120
120
// /
121
121
// / The enumerators are ordered in terms of decreasing preference:
122
122
// / an inherited conformance is best, followed by explicit
123
- // / conformances, then implied conformances. Earlier conformance
124
- // / kinds supersede later conformance kinds, possibly with a
123
+ // / conformances, then synthesized and implied conformances. Earlier
124
+ // / conformance kinds supersede later conformance kinds, possibly with a
125
125
// / diagnostic (e.g., if an inherited conformance supersedes an
126
126
// / explicit conformance).
127
127
enum class ConformanceEntryKind : unsigned {
@@ -131,11 +131,11 @@ enum class ConformanceEntryKind : unsigned {
131
131
// / Explicitly specified.
132
132
Explicit,
133
133
134
- // / Implied by an explicitly-specified conformance.
135
- Implied,
136
-
137
134
// / Implicitly synthesized.
138
135
Synthesized,
136
+
137
+ // / Implied by an explicitly-specified conformance.
138
+ Implied,
139
139
};
140
140
141
141
// / Describes the kind of conformance lookup desired.
Original file line number Diff line number Diff line change
1
+ class EnumValueConstructor < EnumType : EnumValueType > where EnumType. RawValue : Hashable { }
2
+ class _PositionRelation_GeneratedWrapperConstructor : EnumValueConstructor < _PositionRelation > { }
3
+ extension _PositionRelation : EnumValueType { }
4
+ protocol EnumValueType : RawRepresentable { }
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-sil -module-name main -primary-file %s %S/Inputs/protocol-conformance-sr6839-other.swift | %FileCheck -check-prefix CHECK-FIRST %s
2
+ // RUN: %target-swift-frontend -emit-sil -module-name main %s -primary-file %S/Inputs/protocol-conformance-sr6839-other.swift | %FileCheck -check-prefix CHECK-SECOND %s
3
+
4
+ // We need to consistently pick where the witness table for _PositionRelation :
5
+ // RawRepresentable goes.
6
+ // CHECK-FIRST: sil_witness_table hidden _PositionRelation: RawRepresentable
7
+ // CHECK-SECOND-NOT: sil_witness_table hidden _PositionRelation: RawRepresentable
8
+ enum _PositionRelation : Int {
9
+ case before = 0
10
+ }
You can’t perform that action at this time.
0 commit comments