From be5720c18ca6768c7e72d4258677952848db2bb4 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 1 Mar 2017 10:11:49 +0100 Subject: Add @tailrec to avoid regressions. --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/ast') diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index e5904156f..458e94b6e 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -607,7 +607,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { * owner to `to`, and continue until a non-weak owner is reached. */ def changeOwner(from: Symbol, to: Symbol)(implicit ctx: Context): ThisTree = { - def loop(from: Symbol, froms: List[Symbol], tos: List[Symbol]): ThisTree = { + @tailrec def loop(from: Symbol, froms: List[Symbol], tos: List[Symbol]): ThisTree = { if (from.isWeakOwner && !from.owner.isClass) loop(from.owner, from :: froms, to :: tos) else { -- cgit v1.2.3