File tree Expand file tree Collapse file tree 3 files changed +73
-3
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 3 files changed +73
-3
lines changed Original file line number Diff line number Diff line change @@ -491,9 +491,9 @@ void PropertyMap::concretizeNestedTypesFromConcreteParent(
491
491
continue ;
492
492
}
493
493
494
- // FIXME: Maybe this can happen if the concrete type is an
495
- // opaque result type?
496
- assert (!conformance. isAbstract ()) ;
494
+ // This can happen if the concrete type is an opaque result type.
495
+ if (conformance. isAbstract ())
496
+ continue ;
497
497
498
498
auto *concrete = conformance.getConcrete ();
499
499
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-silgen %s -disable-availability-checking
2
+
3
+ protocol P {
4
+ associatedtype T
5
+
6
+ var t : T { get }
7
+ }
8
+
9
+ protocol RecursiveP {
10
+ associatedtype T : RecursiveP
11
+ }
12
+
13
+ struct S_RecursiveP : RecursiveP {
14
+ typealias T = S_RecursiveP
15
+ }
16
+
17
+ struct DefinesRecursiveP : P {
18
+ var t : some RecursiveP {
19
+ return S_RecursiveP ( )
20
+ }
21
+ }
22
+
23
+ protocol HasRecursiveP {
24
+ associatedtype T : RecursiveP
25
+ }
26
+
27
+ extension HasRecursiveP where T == DefinesRecursiveP . T {
28
+ func checkSameType( _ t: T ) -> DefinesRecursiveP . T { return t }
29
+ }
30
+
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -typecheck -verify %s -disable-availability-checking
2
+
3
+ public protocol View {
4
+ associatedtype Body : View
5
+ var body : Body { get }
6
+ }
7
+
8
+ public struct Text : View {
9
+ public init ( _: String ) { }
10
+ public var body : Self { return self }
11
+ }
12
+
13
+ public protocol DisplayableValue { }
14
+
15
+ public protocol SingleValueDisplay : View {
16
+ associatedtype DisplayedValue
17
+ init ( _ singleValue: DisplayedValue )
18
+ var displayedValue : DisplayedValue { get }
19
+ }
20
+
21
+ public protocol RawDisplayableValue : DisplayableValue {
22
+ associatedtype RawDisplay : SingleValueDisplay
23
+ where RawDisplay. DisplayedValue == Self
24
+ }
25
+
26
+ public protocol RawTextDisplayableValue : RawDisplayableValue
27
+ where Self: CustomStringConvertible ,
28
+ RawDisplay == RawTextDisplay < Self > { }
29
+
30
+ public struct RawTextDisplay < Value: CustomStringConvertible > : SingleValueDisplay {
31
+ public var displayedValue : Value
32
+
33
+ public init ( _ singleValue: Value ) {
34
+ self . displayedValue = singleValue
35
+ }
36
+
37
+ public var body : some View {
38
+ Text ( displayedValue. description)
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments