aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/CompilerTest.scala
diff options
context:
space:
mode:
authorNicolas Stucki <nicolas.stucki@gmail.com>2017-03-01 10:11:49 +0100
committerNicolas Stucki <nicolas.stucki@gmail.com>2017-03-01 13:03:44 +0100
commitbe5720c18ca6768c7e72d4258677952848db2bb4 (patch)
treea781b4f8b2772de09db54352d2d50602a1a0a4a6 /compiler/test/dotty/tools/dotc/CompilerTest.scala
parent1a490393d766039332bfccb8b85f264f22c9e9cc (diff)
downloaddotty-be5720c18ca6768c7e72d4258677952848db2bb4.tar.gz
dotty-be5720c18ca6768c7e72d4258677952848db2bb4.tar.bz2
dotty-be5720c18ca6768c7e72d4258677952848db2bb4.zip
Add @tailrec to avoid regressions.
Diffstat (limited to 'compiler/test/dotty/tools/dotc/CompilerTest.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/CompilerTest.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/test/dotty/tools/dotc/CompilerTest.scala b/compiler/test/dotty/tools/dotc/CompilerTest.scala
index 5d16917cc..db12994f4 100644
--- a/compiler/test/dotty/tools/dotc/CompilerTest.scala
+++ b/compiler/test/dotty/tools/dotc/CompilerTest.scala
@@ -500,12 +500,12 @@ abstract class CompilerTest {
* that aren't in extensionsToCopy. */
private def recCopyFiles(sourceFile: Path, dest: Path): Unit = {
- def copyfile(file: SFile, bytewise: Boolean): Unit = {
+ @tailrec def copyfile(file: SFile, bytewise: Boolean): Unit = {
if (bytewise) {
val in = file.inputStream()
val out = SFile(dest).outputStream()
val buffer = new Array[Byte](1024)
- def loop(available: Int):Unit = {
+ @tailrec def loop(available: Int):Unit = {
if (available < 0) {()}
else {
out.write(buffer, 0, available)