@@ -100,11 +100,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
100
100
101
101
def copy (original : Tree )(name : String )(implicit ctx : Context ): Ident =
102
102
tpd.cpy.Ident (original)(name.toTermName)
103
-
104
- def unapply (x : Term )(implicit ctx : Context ): Option [String ] = x match {
105
- case x : tpd.Ident if x.isTerm => Some (x.name.show)
106
- case _ => None
107
- }
108
103
}
109
104
110
105
object Select extends SelectModule {
@@ -119,11 +114,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
119
114
120
115
def copy (original : Tree )(qualifier : Term , name : String )(implicit ctx : Context ): Select =
121
116
tpd.cpy.Select (original)(qualifier, name.toTermName)
122
-
123
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , String )] = x match {
124
- case x : tpd.Select if x.isTerm => Some ((x.qualifier, x.name.toString))
125
- case _ => None
126
- }
127
117
}
128
118
129
119
object Literal extends LiteralModule {
@@ -133,11 +123,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
133
123
134
124
def copy (original : Tree )(constant : Constant )(implicit ctx : Context ): Literal =
135
125
tpd.cpy.Literal (original)(constant)
136
-
137
- def unapply (x : Term )(implicit ctx : Context ): Option [Constant ] = x match {
138
- case Trees .Literal (const) => Some (const)
139
- case _ => None
140
- }
141
126
}
142
127
143
128
object This extends ThisModule {
@@ -147,11 +132,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
147
132
148
133
def copy (original : Tree )(qual : Option [Id ])(implicit ctx : Context ): This =
149
134
tpd.cpy.This (original)(qual.getOrElse(untpd.EmptyTypeIdent ))
150
-
151
- def unapply (x : Term )(implicit ctx : Context ): Option [Option [Id ]] = x match {
152
- case Trees .This (qual) => Some (optional(qual))
153
- case _ => None
154
- }
155
135
}
156
136
157
137
object New extends NewModule {
@@ -160,11 +140,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
160
140
161
141
def copy (original : Tree )(tpt : TypeTree )(implicit ctx : Context ): New =
162
142
tpd.cpy.New (original)(tpt)
163
-
164
- def unapply (x : Term )(implicit ctx : Context ): Option [TypeTree ] = x match {
165
- case x : tpd.New => Some (x.tpt)
166
- case _ => None
167
- }
168
143
}
169
144
170
145
object NamedArg extends NamedArgModule {
@@ -174,11 +149,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
174
149
175
150
def copy (tree : NamedArg )(name : String , arg : Term )(implicit ctx : Context ): NamedArg =
176
151
tpd.cpy.NamedArg (tree)(name.toTermName, arg)
177
-
178
- def unapply (x : Term )(implicit ctx : Context ): Option [(String , Term )] = x match {
179
- case x : tpd.NamedArg if x.name.isInstanceOf [Names .TermName ] => Some ((x.name.toString, x.arg))
180
- case _ => None
181
- }
182
152
}
183
153
184
154
object Apply extends ApplyModule {
@@ -188,11 +158,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
188
158
189
159
def copy (original : Tree )(fun : Term , args : List [Term ])(implicit ctx : Context ): Apply =
190
160
tpd.cpy.Apply (original)(fun, args)
191
-
192
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , List [Term ])] = x match {
193
- case x : tpd.Apply => Some ((x.fun, x.args))
194
- case _ => None
195
- }
196
161
}
197
162
198
163
object TypeApply extends TypeApplyModule {
@@ -202,11 +167,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
202
167
203
168
def copy (original : Tree )(fun : Term , args : List [TypeTree ])(implicit ctx : Context ): TypeApply =
204
169
tpd.cpy.TypeApply (original)(fun, args)
205
-
206
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , List [TypeTree ])] = x match {
207
- case x : tpd.TypeApply => Some ((x.fun, x.args))
208
- case _ => None
209
- }
210
170
}
211
171
212
172
object Super extends SuperModule {
@@ -215,11 +175,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
215
175
216
176
def copy (original : Tree )(qual : Term , mix : Option [Id ])(implicit ctx : Context ): Super =
217
177
tpd.cpy.Super (original)(qual, mix.getOrElse(untpd.EmptyTypeIdent ))
218
-
219
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Option [Id ])] = x match {
220
- case x : tpd.Super => Some ((x.qual, if (x.mix.isEmpty) None else Some (x.mix)))
221
- case _ => None
222
- }
223
178
}
224
179
225
180
object Typed extends TypedModule {
@@ -228,11 +183,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
228
183
229
184
def copy (original : Tree )(expr : Term , tpt : TypeTree )(implicit ctx : Context ): Typed =
230
185
tpd.cpy.Typed (original)(expr, tpt)
231
-
232
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , TypeTree )] = x match {
233
- case x : tpd.Typed => Some ((x.expr, x.tpt))
234
- case _ => None
235
- }
236
186
}
237
187
238
188
object Assign extends AssignModule {
@@ -242,10 +192,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
242
192
def copy (original : Tree )(lhs : Term , rhs : Term )(implicit ctx : Context ): Assign =
243
193
tpd.cpy.Assign (original)(lhs, rhs)
244
194
245
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Term )] = x match {
246
- case x : tpd.Assign => Some ((x.lhs, x.rhs))
247
- case _ => None
248
- }
249
195
}
250
196
251
197
object Block extends BlockModule {
@@ -254,11 +200,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
254
200
255
201
def copy (original : Tree )(stats : List [Statement ], expr : Term )(implicit ctx : Context ): Block =
256
202
tpd.cpy.Block (original)(stats, expr)
257
-
258
- def unapply (x : Term )(implicit ctx : Context ): Option [(List [Statement ], Term )] = x match {
259
- case IsBlock (x) => Some ((x.stats, x.expr))
260
- case _ => None
261
- }
262
203
}
263
204
264
205
object Inlined extends InlinedModule {
@@ -267,12 +208,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
267
208
268
209
def copy (original : Tree )(call : Option [TermOrTypeTree ], bindings : List [Definition ], expansion : Term )(implicit ctx : Context ): Inlined =
269
210
tpd.cpy.Inlined (original)(call.getOrElse(tpd.EmptyTree ), bindings.asInstanceOf [List [tpd.MemberDef ]], expansion)
270
-
271
- def unapply (x : Term )(implicit ctx : Context ): Option [(Option [TermOrTypeTree ], List [Statement ], Term )] = x match {
272
- case x : tpd.Inlined =>
273
- Some ((optional(x.call), x.bindings, x.expansion))
274
- case _ => None
275
- }
276
211
}
277
212
278
213
object Lambda extends LambdaModule {
@@ -282,10 +217,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
282
217
def copy (original : Tree )(meth : Tree , tpt : Option [TypeTree ])(implicit ctx : Context ): Lambda =
283
218
tpd.cpy.Closure (original)(Nil , meth, tpt.getOrElse(tpd.EmptyTree ))
284
219
285
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Option [TypeTree ])] = x match {
286
- case x : tpd.Closure => Some ((x.meth, optional(x.tpt)))
287
- case _ => None
288
- }
289
220
}
290
221
291
222
object If extends IfModule {
@@ -295,10 +226,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
295
226
def copy (original : Tree )(cond : Term , thenp : Term , elsep : Term )(implicit ctx : Context ): If =
296
227
tpd.cpy.If (original)(cond, thenp, elsep)
297
228
298
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Term , Term )] = x match {
299
- case x : tpd.If => Some ((x.cond, x.thenp, x.elsep))
300
- case _ => None
301
- }
302
229
}
303
230
304
231
object Match extends MatchModule {
@@ -307,11 +234,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
307
234
308
235
def copy (original : Tree )(selector : Term , cases : List [CaseDef ])(implicit ctx : Context ): Match =
309
236
tpd.cpy.Match (original)(selector, cases)
310
-
311
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , List [CaseDef ])] = x match {
312
- case x : tpd.Match => Some ((x.selector, x.cases))
313
- case _ => None
314
- }
315
237
}
316
238
317
239
object Try extends TryModule {
@@ -320,11 +242,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
320
242
321
243
def copy (original : Tree )(expr : Term , cases : List [CaseDef ], finalizer : Option [Term ])(implicit ctx : Context ): Try =
322
244
tpd.cpy.Try (original)(expr, cases, finalizer.getOrElse(tpd.EmptyTree ))
323
-
324
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , List [CaseDef ], Option [Term ])] = x match {
325
- case x : tpd.Try => Some ((x.expr, x.cases, optional(x.finalizer)))
326
- case _ => None
327
- }
328
245
}
329
246
330
247
object Return extends ReturnModule {
@@ -333,11 +250,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
333
250
334
251
def copy (original : Tree )(expr : Term )(implicit ctx : Context ): Return =
335
252
tpd.cpy.Return (original)(expr, tpd.ref(ctx.owner))
336
-
337
- def unapply (x : Term )(implicit ctx : Context ): Option [Term ] = x match {
338
- case x : tpd.Return => Some (x.expr)
339
- case _ => None
340
- }
341
253
}
342
254
343
255
object Repeated extends RepeatedModule {
@@ -346,11 +258,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
346
258
347
259
def copy (original : Tree )(elems : List [Term ], elemtpt : TypeTree )(implicit ctx : Context ): Repeated =
348
260
tpd.cpy.SeqLiteral (original)(elems, elemtpt)
349
-
350
- def unapply (x : Tree )(implicit ctx : Context ): Option [(List [Term ], TypeTree )] = x match {
351
- case x : tpd.SeqLiteral => Some ((x.elems, x.elemtpt))
352
- case _ => None
353
- }
354
261
}
355
262
356
263
object SelectOuter extends SelectOuterModule {
@@ -360,15 +267,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
360
267
361
268
def copy (original : Tree )(qualifier : Term , name : String , levels : Int )(implicit ctx : Context ): SelectOuter =
362
269
tpd.cpy.Select (original)(qualifier, NameKinds .OuterSelectName (name.toTermName, levels))
363
-
364
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Int , Type )] = x match {
365
- case x : tpd.Select =>
366
- x.name match {
367
- case NameKinds .OuterSelectName (_, levels) => Some ((x.qualifier, levels, x.tpe.stripTypeVar))
368
- case _ => None
369
- }
370
- case _ => None
371
- }
372
270
}
373
271
374
272
object While extends WhileModule {
@@ -377,11 +275,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with RootPositionImpl with
377
275
378
276
def copy (original : Tree )(cond : Term , body : Term )(implicit ctx : Context ): While =
379
277
tpd.cpy.WhileDo (original)(cond, body)
380
-
381
- def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Term )] = x match {
382
- case x : tpd.WhileDo => Some ((x.cond, x.body))
383
- case _ => None
384
- }
385
278
}
386
279
}
387
280
0 commit comments