File tree 2 files changed +14
-1
lines changed 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 26
26
52 | case User(city = City(name = "Berlin")) => null // error
27
27
| ^^^^
28
28
| 'patterns.City' doesn't support named patterns
29
+ -- Error: tests/neg/negNamedPatternMatching.scala:55:17 ----------------------------------------------------------------
30
+ 55 |val User(names = notRecursive) = user // error // error
31
+ | ^^^^^^^^^^^^
32
+ | 'names' is unknown
33
+ -- [E045] Cyclic Error: tests/neg/negNamedPatternMatching.scala:55:30 --------------------------------------------------
34
+ 55 |val User(names = notRecursive) = user // error // error
35
+ | ^
36
+ | Recursive value notRecursive needs type
37
+ |
38
+ | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change @@ -49,4 +49,7 @@ val annasCity = user match
49
49
name = " Tom 3" // error
50
50
) => null
51
51
case User (_, name = " Anna" ) => null // error
52
- case User (city = City (name = " Berlin" )) => null // error
52
+ case User (city = City (name = " Berlin" )) => null // error
53
+
54
+ // TODO: Don't show an error about recursive value
55
+ val User (names = notRecursive) = user // error // error
You can’t perform that action at this time.
0 commit comments