From 0ff6c81dd3e3e3a60d8f2db845ada167c8266395 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Sun, 28 Jun 2015 21:42:11 +0100 Subject: Improve method names (m-o) --- src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala | 4 ++-- .../parallel/benchmarks/parallel_array/SequentialOps.scala | 6 +++--- test/files/run/finally.check | 2 +- test/files/run/finally.scala | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala index 8a66c7d274..a702b3cdf5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala @@ -305,7 +305,7 @@ trait PatternTypers { // clearing the type is necessary so that ref will be stabilized; see bug 881 val fun1 = typedPos(fun.pos)(Apply(Select(fun.clearType(), unapplyMethod), unapplyArgTree :: Nil)) - def makeTypedUnApply() = { + def makeTypedUnapply() = { // the union of the expected type and the inferred type of the argument to unapply val glbType = glb(ensureFullyDefined(pt) :: unapplyArg.tpe_* :: Nil) val wrapInTypeTest = canRemedy && !(fun1.symbol.owner isNonBottomSubClass ClassTagClass) @@ -325,7 +325,7 @@ trait PatternTypers { if (isBlackbox(unapplyMethod)) duplErrorTree(BlackboxExtractorExpansion(tree)) else duplErrorTree(WrongShapeExtractorExpansion(tree)) } else - makeTypedUnApply() + makeTypedUnapply() } def wrapClassTagUnapply(uncheckedPattern: Tree, classTagExtractor: Tree, pt: Type): Tree = { diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala index ba32036002..9300851b5f 100644 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala +++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala @@ -425,7 +425,7 @@ trait SequentialOps[T] { } def sequentialDiff(sq: Seq[T], sz: Int) = { - val occmap = occurences(sq) + val occmap = occurrences(sq) val b = new collection.mutable.ArrayBuffer[T] var i = 0 @@ -442,7 +442,7 @@ trait SequentialOps[T] { } def sequentialIntersect(sq: Seq[T], sz: Int) = { - val occmap = occurences(sq) + val occmap = occurrences(sq) val b = new collection.mutable.ArrayBuffer[T] var i = 0 @@ -461,7 +461,7 @@ trait SequentialOps[T] { res } - private def occurences(sq: Seq[T]) = { + private def occurrences(sq: Seq[T]) = { val occmap = new collection.mutable.HashMap[T, Int] { override def default(k: T) = 0 } for (elem <- sq.iterator) occmap(elem) += 1 occmap diff --git a/test/files/run/finally.check b/test/files/run/finally.check index 901a797426..b0f2293d11 100644 --- a/test/files/run/finally.check +++ b/test/files/run/finally.check @@ -29,7 +29,7 @@ body in finally java.lang.Exception ---------------------------------------- -Running nestedFinalies +Running nestedFinallyBlocks in finally 1 in finally 2 ---------------------------------------- diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala index b66354ca03..467c9e5868 100644 --- a/test/files/run/finally.scala +++ b/test/files/run/finally.scala @@ -94,7 +94,7 @@ object Test extends App { } // nested finally blocks with return value - def nestedFinalies: Int = + def nestedFinallyBlocks: Int = try { try { return 10 @@ -123,5 +123,5 @@ object Test extends App { test(throwBody, "throwBody") test(retFinally, "retFinally") test(throwFinally, "throwFinally") - test(nestedFinalies, "nestedFinalies") + test(nestedFinallyBlocks, "nestedFinallyBlocks") } -- cgit v1.2.3