|
| 1 | +-- [E007] Type Mismatch Error: tests/neg/i12049.scala:6:16 ------------------------------------------------------------- |
| 2 | +6 |val x: String = ??? : M[B] // error |
| 3 | + | ^^^^^^^^^^ |
| 4 | + | Found: M[B] |
| 5 | + | Required: String |
| 6 | + | |
| 7 | + | Note: a match type could not be fully reduced: |
| 8 | + | |
| 9 | + | trying to reduce M[B] |
| 10 | + | failed since selector B |
| 11 | + | does not match case A => Int |
| 12 | + | and cannot be shown to be disjoint from it either. |
| 13 | + | Therefore, reduction cannot advance to the remaining case |
| 14 | + | |
| 15 | + | case B => String |
| 16 | + |
| 17 | +longer explanation available when compiling with `-explain` |
| 18 | +-- [E007] Type Mismatch Error: tests/neg/i12049.scala:14:17 ------------------------------------------------------------ |
| 19 | +14 |val y3: String = ??? : Last[Int *: Int *: Boolean *: String *: EmptyTuple] // error |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 21 | + | Found: Last[EmptyTuple.type] |
| 22 | + | Required: String |
| 23 | + | |
| 24 | + | Note: a match type could not be fully reduced: |
| 25 | + | |
| 26 | + | trying to reduce Last[EmptyTuple.type] |
| 27 | + | failed since selector EmptyTuple.type |
| 28 | + | matches none of the cases |
| 29 | + | |
| 30 | + | case _ *: _ *: t => Last[t] |
| 31 | + | case t *: EmptyTuple => t |
| 32 | + |
| 33 | +longer explanation available when compiling with `-explain` |
| 34 | +-- [E007] Type Mismatch Error: tests/neg/i12049.scala:22:20 ------------------------------------------------------------ |
| 35 | +22 |val z3: (A, B, A) = ??? : Reverse[(A, B, A)] // error |
| 36 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 37 | + | Found: Tuple.Concat[Reverse[A *: EmptyTuple.type], (B, A)] |
| 38 | + | Required: (A, B, A) |
| 39 | + | |
| 40 | + | Note: a match type could not be fully reduced: |
| 41 | + | |
| 42 | + | trying to reduce Tuple.Concat[Reverse[A *: EmptyTuple.type], (B, A)] |
| 43 | + | trying to reduce Reverse[A *: EmptyTuple.type] |
| 44 | + | failed since selector A *: EmptyTuple.type |
| 45 | + | matches none of the cases |
| 46 | + | |
| 47 | + | case t1 *: t2 *: ts => Tuple.Concat[Reverse[ts], (t2, t1)] |
| 48 | + | case EmptyTuple => EmptyTuple |
| 49 | + |
| 50 | +longer explanation available when compiling with `-explain` |
0 commit comments