@@ -13,7 +13,7 @@ import Foundation
1313//infix operator <= {}
1414
1515// MARK: basic type
16- public func <= < T> ( inout left: T , right: Mapper ) {
16+ public func <= < T, U > ( inout left: T , right: Mapper < U > ) {
1717 if right. mappingType == MappingType . fromJSON {
1818 FromJSON < T > ( ) . baseType ( & left, object: right. currentValue)
1919 } else {
@@ -22,7 +22,7 @@ public func <=<T>(inout left: T, right: Mapper) {
2222}
2323
2424// Optional basic type
25- public func <= < T> ( inout left: T ? , right: Mapper ) {
25+ public func <= < T, U > ( inout left: T ? , right: Mapper < U > ) {
2626 if right. mappingType == MappingType . fromJSON {
2727 FromJSON < T > ( ) . optionalBaseType ( & left, object: right. currentValue)
2828 } else {
@@ -31,7 +31,7 @@ public func <=<T>(inout left: T?, right: Mapper) {
3131}
3232
3333// Basic type with Transform
34- public func <= < T, N> ( inout left: T , right: ( Mapper , MapperTransform < T , N > ) ) {
34+ public func <= < T, U , N> ( inout left: T , right: ( Mapper < U > , MapperTransform < T , N > ) ) {
3535 if right. 0 . mappingType == MappingType . fromJSON {
3636 var value : T ? = right. 1 . transformFromJSON ( right. 0 . currentValue)
3737 //println("FromJSON \(value)");
@@ -44,7 +44,7 @@ public func <=<T, N>(inout left: T, right: (Mapper, MapperTransform<T, N>)) {
4444}
4545
4646// Optional basic type with Transform
47- public func <= < T, N> ( inout left: T ? , right: ( Mapper , MapperTransform < T , N > ) ) {
47+ public func <= < T, U , N> ( inout left: T ? , right: ( Mapper < U > , MapperTransform < T , N > ) ) {
4848 if right. 0 . mappingType == MappingType . fromJSON {
4949 var value : T ? = right. 1 . transformFromJSON ( right. 0 . currentValue)
5050 //println("FromJSON \(value)");
@@ -57,7 +57,7 @@ public func <=<T, N>(inout left: T?, right: (Mapper, MapperTransform<T, N>)) {
5757}
5858
5959// MARK:- T: Mappable
60- public func <= < T: Mappable > ( inout left: T , right: Mapper ) {
60+ public func <= < T: Mappable , U > ( inout left: T , right: Mapper < U > ) {
6161 if right. mappingType == MappingType . fromJSON {
6262 FromJSON < T > ( ) . object ( & left, object: right. currentValue)
6363 } else {
@@ -66,7 +66,7 @@ public func <=<T: Mappable>(inout left: T, right: Mapper) {
6666}
6767
6868// Optional object conforming to Mappable
69- public func <= < T: Mappable > ( inout left: T ? , right: Mapper ) {
69+ public func <= < T: Mappable , U > ( inout left: T ? , right: Mapper < U > ) {
7070 if right. mappingType == MappingType . fromJSON {
7171 FromJSON < T > ( ) . object ( & left, object: right. currentValue)
7272 } else {
@@ -75,7 +75,7 @@ public func <=<T: Mappable>(inout left: T?, right: Mapper) {
7575}
7676
7777// MARK:- Dictionary <String, T: Mappable>
78- public func <= < T: Mappable > ( inout left: Dictionary < String , T > , right: Mapper ) {
78+ public func <= < T: Mappable , U > ( inout left: Dictionary < String , T > , right: Mapper < U > ) {
7979 if right. mappingType == MappingType . fromJSON {
8080 FromJSON < T > ( ) . objectDictionary ( & left, object: right. currentValue)
8181 } else {
@@ -84,7 +84,7 @@ public func <=<T: Mappable>(inout left: Dictionary<String, T>, right: Mapper) {
8484}
8585
8686// Optional Dictionary <String, T: Mappable>
87- public func <= < T: Mappable > ( inout left: Dictionary < String , T > ? , right: Mapper ) {
87+ public func <= < T: Mappable , U > ( inout left: Dictionary < String , T > ? , right: Mapper < U > ) {
8888 if right. mappingType == MappingType . fromJSON {
8989 FromJSON < T > ( ) . optionalObjectDictionary ( & left, object: right. currentValue)
9090 } else {
@@ -93,7 +93,7 @@ public func <=<T: Mappable>(inout left: Dictionary<String, T>?, right: Mapper) {
9393}
9494
9595// MARK: Dictionary <String, AnyObject>
96- public func <= ( inout left: Dictionary < String , AnyObject > , right: Mapper ) {
96+ public func <= < U > ( inout left: Dictionary < String , AnyObject > , right: Mapper < U > ) {
9797 if right. mappingType == MappingType . fromJSON {
9898 FromJSON < AnyObject > ( ) . baseType ( & left, object: right. currentValue)
9999 } else {
@@ -102,7 +102,7 @@ public func <=(inout left: Dictionary<String, AnyObject>, right: Mapper) {
102102}
103103
104104// Optional dictionary <String, AnyObject>
105- public func <= ( inout left: Dictionary < String , AnyObject > ? , right: Mapper ) {
105+ public func <= < U > ( inout left: Dictionary < String , AnyObject > ? , right: Mapper < U > ) {
106106 if right. mappingType == MappingType . fromJSON {
107107 FromJSON < AnyObject > ( ) . optionalBaseType ( & left, object: right. currentValue)
108108 } else {
@@ -111,7 +111,7 @@ public func <=(inout left: Dictionary<String, AnyObject>?, right: Mapper) {
111111}
112112
113113// MARK:- Array<T: Mappable>
114- public func <= < T: Mappable > ( inout left: Array < T > , right: Mapper ) {
114+ public func <= < T: Mappable , U > ( inout left: Array < T > , right: Mapper < U > ) {
115115 if right. mappingType == MappingType . fromJSON {
116116 FromJSON < T > ( ) . objectArray ( & left, object: right. currentValue)
117117 } else {
@@ -120,7 +120,7 @@ public func <=<T: Mappable>(inout left: Array<T>, right: Mapper) {
120120}
121121
122122// Optional array of objects conforming to Mappable
123- public func <= < T: Mappable > ( inout left: Array < T > ? , right: Mapper ) {
123+ public func <= < T: Mappable , U > ( inout left: Array < T > ? , right: Mapper < U > ) {
124124 if right. mappingType == MappingType . fromJSON {
125125 FromJSON < T > ( ) . optionalObjectArray ( & left, object: right. currentValue)
126126 } else {
@@ -129,7 +129,7 @@ public func <=<T: Mappable>(inout left: Array<T>?, right: Mapper) {
129129}
130130
131131// MARK: Array<AnyObject>
132- public func <= ( inout left: Array < AnyObject > , right: Mapper ) {
132+ public func <= < U > ( inout left: Array < AnyObject > , right: Mapper < U > ) {
133133 if right. mappingType == MappingType . fromJSON {
134134 FromJSON < AnyObject > ( ) . baseType ( & left, object: right. currentValue)
135135 } else {
@@ -138,7 +138,7 @@ public func <=(inout left: Array<AnyObject>, right: Mapper) {
138138}
139139
140140// Optional array of String type
141- public func <= ( inout left: Array < AnyObject > ? , right: Mapper ) {
141+ public func <= < U > ( inout left: Array < AnyObject > ? , right: Mapper < U > ) {
142142 if right. mappingType == MappingType . fromJSON {
143143 FromJSON < AnyObject > ( ) . optionalBaseType ( & left, object: right. currentValue)
144144 } else {
0 commit comments