Skip to content

Commit c23d4c5

Browse files
committed
Test more excoting types
1 parent 4c0ce97 commit c23d4c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/run/runNamedPatternMatching.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ object Test:
22

33
class User(val name: String, val age: Int, val city: String)
44

5-
//TODO: Test this
65
object UserEx:
6+
type Reverse[A, B] = (B, A)
77
class UserExtractor(user: User) extends Product:
88
def _1: String =
99
println("Got name")
@@ -15,7 +15,7 @@ object Test:
1515
println("Got city")
1616
user.city
1717

18-
type Names = ("name", "age", "city")
18+
type Names = "name" *: Reverse["city", "age"]
1919

2020
// Members declared in scala.Equals
2121
def canEqual(that: Any): Boolean = ???
@@ -41,7 +41,7 @@ object Test:
4141

4242
def main(args: Array[String]): Unit =
4343
val UserEx(city = c, name = _) = User("Guy", 25, "Paris")
44-
println("city = " + c: String)
44+
println("city = " + c)
4545
val UserEx2(city = _, name = n) = User("Guy", 25, "Paris")
4646

4747
println(n)

0 commit comments

Comments
 (0)