|
1 |
| --- Error: tests/neg/named-tuples.scala:9:19 ---------------------------------------------------------------------------- |
2 |
| -9 | val illformed = (_2 = 2) // error |
| 1 | +-- Error: tests/neg/named-tuples.scala:8:19 ---------------------------------------------------------------------------- |
| 2 | +8 | val illformed = (_2 = 2) // error |
3 | 3 | | ^^^^^^
|
4 | 4 | | _2 cannot be used as the name of a tuple element because it is a regular tuple selector
|
5 |
| --- Error: tests/neg/named-tuples.scala:10:20 --------------------------------------------------------------------------- |
6 |
| -10 | type Illformed = (_1: Int) // error |
7 |
| - | ^^^^^^^ |
8 |
| - | _1 cannot be used as the name of a tuple element because it is a regular tuple selector |
9 |
| --- Error: tests/neg/named-tuples.scala:11:40 --------------------------------------------------------------------------- |
10 |
| -11 | val illformed2 = (name = "", age = 0, name = true) // error |
| 5 | +-- Error: tests/neg/named-tuples.scala:9:20 ---------------------------------------------------------------------------- |
| 6 | +9 | type Illformed = (_1: Int) // error |
| 7 | + | ^^^^^^^ |
| 8 | + | _1 cannot be used as the name of a tuple element because it is a regular tuple selector |
| 9 | +-- Error: tests/neg/named-tuples.scala:10:40 --------------------------------------------------------------------------- |
| 10 | +10 | val illformed2 = (name = "", age = 0, name = true) // error |
11 | 11 | | ^^^^^^^^^^^
|
12 | 12 | | Duplicate tuple element name
|
13 |
| --- Error: tests/neg/named-tuples.scala:12:45 --------------------------------------------------------------------------- |
14 |
| -12 | type Illformed2 = (name: String, age: Int, name: Boolean) // error |
| 13 | +-- Error: tests/neg/named-tuples.scala:11:45 --------------------------------------------------------------------------- |
| 14 | +11 | type Illformed2 = (name: String, age: Int, name: Boolean) // error |
15 | 15 | | ^^^^^^^^^^^^^
|
16 | 16 | | Duplicate tuple element name
|
17 |
| --- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:20:20 ------------------------------------------------------ |
18 |
| -20 | val _: NameOnly = person // error |
| 17 | +-- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:19:20 ------------------------------------------------------ |
| 18 | +19 | val _: NameOnly = person // error |
19 | 19 | | ^^^^^^
|
20 | 20 | | Found: (Test.person : (name : String, age : Int))
|
21 | 21 | | Required: Test.NameOnly
|
22 | 22 | |
|
23 | 23 | | longer explanation available when compiling with `-explain`
|
24 |
| --- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:21:18 ------------------------------------------------------ |
25 |
| -21 | val _: Person = nameOnly // error |
| 24 | +-- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:20:18 ------------------------------------------------------ |
| 25 | +20 | val _: Person = nameOnly // error |
26 | 26 | | ^^^^^^^^
|
27 | 27 | | Found: (Test.nameOnly : (name : String))
|
28 | 28 | | Required: Test.Person
|
29 | 29 | |
|
30 | 30 | | longer explanation available when compiling with `-explain`
|
31 |
| --- [E172] Type Error: tests/neg/named-tuples.scala:22:41 --------------------------------------------------------------- |
32 |
| -22 | val _: Person = (name = "") ++ nameOnly // error |
| 31 | +-- [E172] Type Error: tests/neg/named-tuples.scala:21:41 --------------------------------------------------------------- |
| 32 | +21 | val _: Person = (name = "") ++ nameOnly // error |
33 | 33 | | ^
|
34 | 34 | | Cannot prove that Tuple.Disjoint[Tuple1[("name" : String)], Tuple1[("name" : String)]] =:= (true : Boolean).
|
35 |
| --- [E008] Not Found Error: tests/neg/named-tuples.scala:23:9 ----------------------------------------------------------- |
36 |
| -23 | person._1 // error |
| 35 | +-- [E008] Not Found Error: tests/neg/named-tuples.scala:22:9 ----------------------------------------------------------- |
| 36 | +22 | person._1 // error |
37 | 37 | | ^^^^^^^^^
|
38 | 38 | | value _1 is not a member of (name : String, age : Int)
|
39 |
| --- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:25:36 ------------------------------------------------------ |
40 |
| -25 | val _: (age: Int, name: String) = person // error |
| 39 | +-- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:24:36 ------------------------------------------------------ |
| 40 | +24 | val _: (age: Int, name: String) = person // error |
41 | 41 | | ^^^^^^
|
42 | 42 | | Found: (Test.person : (name : String, age : Int))
|
43 | 43 | | Required: (age : Int, name : String)
|
44 | 44 | |
|
45 | 45 | | longer explanation available when compiling with `-explain`
|
46 |
| --- Error: tests/neg/named-tuples.scala:27:17 --------------------------------------------------------------------------- |
47 |
| -27 | val (name = x, agee = y) = person // error |
| 46 | +-- Error: tests/neg/named-tuples.scala:26:17 --------------------------------------------------------------------------- |
| 47 | +26 | val (name = x, agee = y) = person // error |
48 | 48 | | ^^^^^^^^
|
49 | 49 | | No element named `agee` is defined in selector type (name : String, age : Int)
|
50 |
| --- Error: tests/neg/named-tuples.scala:30:10 --------------------------------------------------------------------------- |
51 |
| -30 | case (name = n, age = a) => () // error // error |
| 50 | +-- Error: tests/neg/named-tuples.scala:29:10 --------------------------------------------------------------------------- |
| 51 | +29 | case (name = n, age = a) => () // error // error |
52 | 52 | | ^^^^^^^^
|
53 | 53 | | No element named `name` is defined in selector type (String, Int)
|
54 |
| --- Error: tests/neg/named-tuples.scala:30:20 --------------------------------------------------------------------------- |
55 |
| -30 | case (name = n, age = a) => () // error // error |
| 54 | +-- Error: tests/neg/named-tuples.scala:29:20 --------------------------------------------------------------------------- |
| 55 | +29 | case (name = n, age = a) => () // error // error |
56 | 56 | | ^^^^^^^
|
57 | 57 | | No element named `age` is defined in selector type (String, Int)
|
58 |
| --- [E172] Type Error: tests/neg/named-tuples.scala:32:27 --------------------------------------------------------------- |
59 |
| -32 | val pp = person ++ (1, 2) // error |
| 58 | +-- [E172] Type Error: tests/neg/named-tuples.scala:31:27 --------------------------------------------------------------- |
| 59 | +31 | val pp = person ++ (1, 2) // error |
60 | 60 | | ^
|
61 | 61 | | Cannot prove that Tuple.Disjoint[(("name" : String), ("age" : String)), Tuple] =:= (true : Boolean).
|
62 |
| --- [E172] Type Error: tests/neg/named-tuples.scala:35:18 --------------------------------------------------------------- |
63 |
| -35 | person ++ (1, 2) match // error |
| 62 | +-- [E172] Type Error: tests/neg/named-tuples.scala:34:18 --------------------------------------------------------------- |
| 63 | +34 | person ++ (1, 2) match // error |
64 | 64 | | ^
|
65 | 65 | | Cannot prove that Tuple.Disjoint[(("name" : String), ("age" : String)), Tuple] =:= (true : Boolean).
|
66 |
| --- Error: tests/neg/named-tuples.scala:38:17 --------------------------------------------------------------------------- |
67 |
| -38 | val bad = ("", age = 10) // error |
| 66 | +-- Error: tests/neg/named-tuples.scala:37:17 --------------------------------------------------------------------------- |
| 67 | +37 | val bad = ("", age = 10) // error |
68 | 68 | | ^^^^^^^^
|
69 | 69 | | Illegal combination of named and unnamed tuple elements
|
70 |
| --- Error: tests/neg/named-tuples.scala:41:20 --------------------------------------------------------------------------- |
71 |
| -41 | case (name = n, age) => () // error |
| 70 | +-- Error: tests/neg/named-tuples.scala:40:20 --------------------------------------------------------------------------- |
| 71 | +40 | case (name = n, age) => () // error |
72 | 72 | | ^^^
|
73 | 73 | | Illegal combination of named and unnamed tuple elements
|
74 |
| --- Error: tests/neg/named-tuples.scala:42:16 --------------------------------------------------------------------------- |
75 |
| -42 | case (name, age = a) => () // error |
| 74 | +-- Error: tests/neg/named-tuples.scala:41:16 --------------------------------------------------------------------------- |
| 75 | +41 | case (name, age = a) => () // error |
76 | 76 | | ^^^^^^^
|
77 | 77 | | Illegal combination of named and unnamed tuple elements
|
78 |
| --- Error: tests/neg/named-tuples.scala:45:10 --------------------------------------------------------------------------- |
79 |
| -45 | case (age = x) => // error |
| 78 | +-- Error: tests/neg/named-tuples.scala:44:10 --------------------------------------------------------------------------- |
| 79 | +44 | case (age = x) => // error |
80 | 80 | | ^^^^^^^
|
81 | 81 | | No element named `age` is defined in selector type Tuple
|
82 |
| --- [E172] Type Error: tests/neg/named-tuples.scala:47:27 --------------------------------------------------------------- |
83 |
| -47 | val p2 = person ++ person // error |
| 82 | +-- [E172] Type Error: tests/neg/named-tuples.scala:46:27 --------------------------------------------------------------- |
| 83 | +46 | val p2 = person ++ person // error |
84 | 84 | | ^
|
85 | 85 | |Cannot prove that Tuple.Disjoint[(("name" : String), ("age" : String)), (("name" : String), ("age" : String))] =:= (true : Boolean).
|
86 |
| --- [E172] Type Error: tests/neg/named-tuples.scala:48:43 --------------------------------------------------------------- |
87 |
| -48 | val p3 = person ++ (first = 11, age = 33) // error |
| 86 | +-- [E172] Type Error: tests/neg/named-tuples.scala:47:43 --------------------------------------------------------------- |
| 87 | +47 | val p3 = person ++ (first = 11, age = 33) // error |
88 | 88 | | ^
|
89 | 89 | |Cannot prove that Tuple.Disjoint[(("name" : String), ("age" : String)), (("first" : String), ("age" : String))] =:= (true : Boolean).
|
90 |
| --- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:50:22 ------------------------------------------------------ |
91 |
| -50 | val p5 = person.zip((first = 11, age = 33)) // error |
| 90 | +-- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:49:22 ------------------------------------------------------ |
| 91 | +49 | val p5 = person.zip((first = 11, age = 33)) // error |
92 | 92 | | ^^^^^^^^^^^^^^^^^^^^^^
|
93 | 93 | | Found: (first : Int, age : Int)
|
94 | 94 | | Required: NamedTuple.NamedTuple[(("name" : String), ("age" : String)), Tuple]
|
95 | 95 | |
|
96 | 96 | | longer explanation available when compiling with `-explain`
|
97 |
| --- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:61:32 ------------------------------------------------------ |
98 |
| -61 | val typo: (name: ?, age: ?) = (name = "he", ag = 1) // error |
| 97 | +-- [E007] Type Mismatch Error: tests/neg/named-tuples.scala:60:32 ------------------------------------------------------ |
| 98 | +60 | val typo: (name: ?, age: ?) = (name = "he", ag = 1) // error |
99 | 99 | | ^^^^^^^^^^^^^^^^^^^^^
|
100 | 100 | | Found: (name : String, ag : Int)
|
101 | 101 | | Required: (name : ?, age : ?)
|
|
0 commit comments