Skip to content

Commit 93258da

Browse files
committed
Turn i7788.scala into a proper test
1 parent 4de44e3 commit 93258da

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/run/i7788.check

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(0), hello)
2+
Left(-1)
3+
Right(success message)

tests/run/i7788.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ given showEither[A,B]: (sA: Show[A]) => Show[B] => Show[Either[A,B]] =
88
_.fold(a => s"Left(${summon[Show[A]].show(a)})", b => s"Right(${summon[Show[B]].show(b)})")
99
given [A,B]: (sA: Show[A]) => (sB: Show[B]) => Show[(A,B)] = (a,b) => s"(${sA.show(a)}), ${sB.show(b)})"
1010

11-
@main def ShowDemo =
11+
@main def Test =
1212
println(summon[Show[(Int, String)]].show(0 -> "hello"))
1313
println(summon[Show[Either[Int, String]]].show(Left(-1)))
1414
println(summon[Show[Either[Int, String]]].show(Right("success message")))

0 commit comments

Comments
 (0)