From 02174dbe56298e6ddfe9e9805ec8a9d08a44ed89 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Wed, 27 Jun 2018 10:55:02 +0900 Subject: [PATCH] fix typo --- core/src/main/scala/simulacrum/typeclass.scala | 2 +- core/src/test/scala/simulacrum/jvm.scala | 6 +++--- examples/src/test/scala/simulacrum/examples/examples.scala | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/scala/simulacrum/typeclass.scala b/core/src/main/scala/simulacrum/typeclass.scala index 1fc4940..3a095f9 100644 --- a/core/src/main/scala/simulacrum/typeclass.scala +++ b/core/src/main/scala/simulacrum/typeclass.scala @@ -203,7 +203,7 @@ class TypeClassMacros(val c: Context) { val skipMethod = !simpleArgs.foldLeft(true)(_ && _._2.isDefined) if(skipMethod) List.empty else { - //rewrites all occurences of any of the args which are defined on the method to the lifted arg + //rewrites all occurrences of any of the args which are defined on the method to the lifted arg val rewriteSimpleArgs = new FoldTransformer(simpleArgs.foldLeft(List.empty[Transformer]) { case (ts, (_, Some(simpleArg), liftedTypeArg, _)) => new RewriteTypeName(from = simpleArg.toTypeName, to = liftedTypeArg.name) :: ts }) diff --git a/core/src/test/scala/simulacrum/jvm.scala b/core/src/test/scala/simulacrum/jvm.scala index fe08e13..01f6520 100644 --- a/core/src/test/scala/simulacrum/jvm.scala +++ b/core/src/test/scala/simulacrum/jvm.scala @@ -10,12 +10,12 @@ import scala.collection.immutable.List class JvmTypeClassTest extends WordSpec with Matchers { "the @typeclass annotation" should { "generate serializable traits by default" in { - seralizeDeserialize(Semigroup[Int]).append(1, 2) shouldBe 3 - seralizeDeserialize(Functor[List]).map(List(1, 2, 3))(_+1) shouldBe List(2, 3, 4) + serializeDeserialize(Semigroup[Int]).append(1, 2) shouldBe 3 + serializeDeserialize(Functor[List]).map(List(1, 2, 3))(_+1) shouldBe List(2, 3, 4) } } - def seralizeDeserialize[A](value: A): A = { + def serializeDeserialize[A](value: A): A = { import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream } val bytesOut = new ByteArrayOutputStream() val os = new ObjectOutputStream(bytesOut) diff --git a/examples/src/test/scala/simulacrum/examples/examples.scala b/examples/src/test/scala/simulacrum/examples/examples.scala index 06e7779..674c2fe 100644 --- a/examples/src/test/scala/simulacrum/examples/examples.scala +++ b/examples/src/test/scala/simulacrum/examples/examples.scala @@ -206,7 +206,7 @@ class Examples extends WordSpec with Matchers { (1 |+| 2) =#= (2 |+| 1) } - // Alernatively, multiple type class ops can be combined in to a syntax object, which provides + // Alternatively, multiple type class ops can be combined in to a syntax object, which provides // a single import for all implicit conversions { object all extends Equal.ToEqualOps with Semigroup.ToSemigroupOps with Monoid.ToMonoidOps