really?
they seem to be generated quite similarly
- if generated by the tailcalls phase, their parameters are existing
> symbols defined in the code before the tailcall
val label = method.newLabel(newTermName("_" + method.name),
method.pos)
val thisParam =
method.newSyntheticValueParam(currentClass.typeOfThis)
label setInfo MethodType(thisParam :: method.tpe.params,
method.tpe.finalResultType)
> - if generated by the virtualized pattern matcher, their parameters are
> new symbols, appearing there for the first time
val matchEnd = NoSymbol.newLabel(freshName("matchEnd"), NoPosition)
setFlag SYNTH_CASE
val matchRes = NoSymbol.newValueParameter(newTermName("x"),
NoPosition, SYNTHETIC) setInfo restpe.withoutAnnotations //
matchEnd setInfo MethodType(List(matchRes), restpe)
ignore the NoSymbol -- the owner is changed later (yes, I know, this needs
to be fixed, and I will get to that)