File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,14 @@ class SILTypeSubstituter :
420420 substObjectType));
421421 }
422422
423+ // / MoveOnlyWrappedTypes need to have their inner types substituted
424+ // / by these rules.
425+ CanType visitSILMoveOnlyWrappedType (CanSILMoveOnlyWrappedType origType) {
426+ CanType origInnerType = origType->getInnerType ();
427+ CanType substInnerType = visit (origInnerType);
428+ return CanType (SILMoveOnlyWrappedType::get (substInnerType));
429+ }
430+
423431 // / Any other type would be a valid type in the AST. Just apply the
424432 // / substitution on the AST level and then lower that.
425433 CanType visitType (CanType origType) {
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -emit-sil -O %s
2+
3+ public struct Mutex < T> {
4+ public init ( _: T ) { }
5+ }
6+
7+ public struct Locked < T> {
8+ public let mutex : Mutex < T >
9+
10+ public init ( _ rawValue: consuming T ) {
11+ mutex = Mutex ( rawValue)
12+ }
13+ }
14+
15+ _ = Locked { }
You can’t perform that action at this time.
0 commit comments