File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -138,25 +138,26 @@ object Tuples {
138
138
139
139
rewrite def head : Any = {
140
140
erased val resTpe = Typed (_head(xs))
141
- rewrite _size(xs) match {
141
+ val resVal = rewrite _size(xs) match {
142
142
case 1 =>
143
143
val t = xs.asInstanceOf [Tuple1 [_]]
144
- t._1. asInstanceOf [resTpe. Type ]
144
+ t._1
145
145
case 2 =>
146
146
val t = xs.asInstanceOf [Tuple2 [_, _]]
147
- t._1. asInstanceOf [resTpe. Type ]
147
+ t._1
148
148
case 3 =>
149
149
val t = xs.asInstanceOf [Tuple3 [_, _, _]]
150
- t._1. asInstanceOf [resTpe. Type ]
150
+ t._1
151
151
case 4 =>
152
152
val t = xs.asInstanceOf [Tuple4 [_, _, _, _]]
153
- t._1. asInstanceOf [resTpe. Type ]
153
+ t._1
154
154
case n if n > 4 && n <= MaxSpecialized =>
155
- xs.asInstanceOf [Product ].productElement(0 ). asInstanceOf [resTpe. Type ]
155
+ xs.asInstanceOf [Product ].productElement(0 )
156
156
case n if n > MaxSpecialized =>
157
157
val t = xs.asInstanceOf [TupleXXL ]
158
- t.elems(0 ). asInstanceOf [resTpe. Type ]
158
+ t.elems(0 )
159
159
}
160
+ resVal.asInstanceOf [resTpe.Type ]
160
161
}
161
162
162
163
rewrite def tail : Any = {
You can’t perform that action at this time.
0 commit comments