Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

Fist two commits make changes to loops, the third only adds @tailrec annotations.

}
case pre: RecType =>
val candidate = loop(pre.parent)
val candidate = pre.parent.lookupRefined(name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is not necessary. It will still get tail-rec optimized even without it.
You can use #1221 to mark per-callsite @tailrec-s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I used it in several places. In this instance it was easier to use the old notation.

*/
final def classSymbol(implicit ctx: Context): Symbol = this match {
case ConstantType(constant) =>
constant.tpe.classSymbol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't this already tailrec optimized?
Instead of rewriting by hand I suggest using #1221

@nicolasstucki nicolasstucki force-pushed the tailrec-derivesFrom branch 3 times, most recently from 95db95a to b3835b5 Compare March 1, 2017 12:02
@DarkDimius
Copy link
Contributor

LGTM

@DarkDimius DarkDimius merged commit 141fb4b into scala:master Mar 15, 2017
@allanrenucci allanrenucci deleted the tailrec-derivesFrom branch December 14, 2017 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants