Skip to content

Commit

Permalink
Reproduce issues from #56
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Jul 7, 2021
1 parent 40d3e8d commit c63c8e6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version = "3.0.0-RC5"
runner.dialect = scala3
rewrite.scala3.insertEndMarkerMinLines = 50
maxColumn = 140
align.preset = some
align.tokens.add = [
Expand Down
17 changes: 17 additions & 0 deletions tests/src/test/scala/Demo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ class Tests extends FunSuite {
"LocalClass(a)"
)
}

test("Lone case object should use the default toString") {
assertEquals(CaseObject.toString, "CaseObject")
}

test("Case object with toString should not get extra toString") {
assertEquals(
CaseObjectWithToString.toString,
"example"
)
}
}

case object CaseObject

case object CaseObjectWithToString {
override val toString: String = "example"
}

final case class SimpleCaseClass(name: String, age: Int)
Expand Down

0 comments on commit c63c8e6

Please sign in to comment.