Skip to content

Commit

Permalink
Scalaformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
t1b00 committed Nov 23, 2024
1 parent 5058a9d commit 3d43821
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions input/src/main/scala/fix/IsInstanceOf.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ object IsInstanceOf {
case class MappingCharFilter(name: String, mappings: (String, String)*) // scalafix: ok;

val pf: PartialFunction[Any, Unit] = {
case s: String => println(s) // scalafix: ok;
case s: String => println(s) // scalafix: ok;
case i: Int if i == 4 => println(i) // scalafix: ok;
case _ => println("no match :(") // scalafix: ok;
case _ => println("no match :(") // scalafix: ok;
}

@SuppressWarnings(Array("all"))
Expand All @@ -28,14 +28,13 @@ object IsInstanceOf {
println(s.isInstanceOf[String]) // scalafix: ok;
}


sealed trait MyGADT[T]
final case class VariantInt(value: Int) extends MyGADT[Int]
final case class VariantString(value: String) extends MyGADT[String]

def doStuff[T](gadt: MyGADT[T]): T = { // scalafix: ok;
gadt match {
case VariantInt(value) => value
case VariantInt(value) => value
case VariantString(value) => value
}
}
Expand Down

0 comments on commit 3d43821

Please sign in to comment.