@@ -21,6 +21,15 @@ struct Wrapper<T> {
2121 }
2222}
2323
24+ @propertyWrapper
25+ struct ImplementationDetailWrapper < T> {
26+ var wrappedValue : T
27+
28+ init ( wrappedValue: T ) {
29+ self . wrappedValue = wrappedValue
30+ }
31+ }
32+
2433func globalFunc( @Wrapper arg: Int ) {
2534 let _: Int = arg
2635 let _: Projection < Int > = $arg
@@ -36,6 +45,17 @@ func testGlobalFunc(value: Int, projection: Projection<Int>) {
3645 let _: ( Projection < Int > ) -> Void = globalFunc ( $arg: )
3746}
3847
48+ func globalFuncWithImplementationDetailWrapper( @ImplementationDetailWrapper arg: Int ) {
49+ let _: Int = arg
50+ let _: ImplementationDetailWrapper < Int > = _arg
51+ }
52+
53+ func testGlobalFuncWithImplementationDetailWrapper( value: Int ) {
54+ globalFuncWithImplementationDetailWrapper ( arg: value)
55+
56+ let _: ( Int ) -> Void = globalFuncWithImplementationDetailWrapper
57+ let _: ( Int ) -> Void = globalFuncWithImplementationDetailWrapper ( arg: )
58+ }
3959
4060struct S < Value> {
4161 func method( @Wrapper arg: Value ) {
@@ -44,11 +64,21 @@ struct S<Value> {
4464 let _: Wrapper < Value > = _arg
4565 }
4666
67+ func methodWithImplementationDetailWrapper( @ImplementationDetailWrapper arg: Value ) {
68+ let _: Value = arg
69+ let _: ImplementationDetailWrapper < Value > = _arg
70+ }
71+
4772 static func staticMethod( @Wrapper arg: Value ) {
4873 let _: Value = arg
4974 let _: Projection < Value > = $arg
5075 let _: Wrapper < Value > = _arg
5176 }
77+
78+ static func staticMethodWithImplementationDetailWrapper( @ImplementationDetailWrapper arg: Value ) {
79+ let _: Value = arg
80+ let _: ImplementationDetailWrapper < Value > = _arg
81+ }
5282}
5383
5484func testMethods( instance: S < String > , Metatype: S < String > . Type ,
@@ -76,6 +106,22 @@ func testMethods(instance: S<String>, Metatype: S<String>.Type,
76106 let _: ( S ) -> ( Projection < String > ) -> Void = Metatype . method ( $arg: )
77107}
78108
109+ func testMethodsWithImplementationDetailWrapper( instance: S < String > , Metatype: S < String > . Type ,
110+ @ImplementationDetailWrapper value: String ) {
111+ Metatype . staticMethodWithImplementationDetailWrapper ( arg: value)
112+
113+ instance. methodWithImplementationDetailWrapper ( arg: value)
114+
115+ let _: ( String ) -> Void = Metatype . staticMethodWithImplementationDetailWrapper
116+ let _: ( String ) -> Void = Metatype . staticMethodWithImplementationDetailWrapper ( arg: )
117+
118+ let _: ( String ) -> Void = instance. methodWithImplementationDetailWrapper
119+ let _: ( String ) -> Void = instance. methodWithImplementationDetailWrapper ( arg: )
120+
121+ let _: ( S ) -> ( String ) -> Void = Metatype . methodWithImplementationDetailWrapper
122+ let _: ( S ) -> ( String ) -> Void = Metatype . methodWithImplementationDetailWrapper ( arg: )
123+ }
124+
79125func testClosures( ) {
80126 typealias PropertyWrapperTuple = ( Wrapper < Int > , Int , Projection < Int > )
81127
@@ -88,6 +134,12 @@ func testClosures() {
88134 }
89135}
90136
137+ func testClosuresWithImplementationDetailWrapper( ) {
138+ let _: ( Int ) -> ( ImplementationDetailWrapper < Int > , Int ) = { ( @ImplementationDetailWrapper value) in
139+ ( _value, value)
140+ }
141+ }
142+
91143func projectionPlaceholder< T> ( @Wrapper _ value: T ) { }
92144
93145func testOmittedProjectionLabel( value: Int ) {
0 commit comments