|
| 1 | + |
| 2 | +-- [E172] Type Error: tests/neg/i15183/test_2.scala:2:17 --------------------------------------------------------------- |
| 3 | +2 |enum Env derives Decoder: // error |
| 4 | + | ^ |
| 5 | + |No given instance of type Tuple.Map[m.MirroredElemTypes, Decoder] was found for parameter d of given instance derived in object Decoder. |
| 6 | + |I found: |
| 7 | + | |
| 8 | + | Decoder.summonTuple[(Env.Local : Env), ((Env.Sit : Env), (Env.Prod : Env))]( |
| 9 | + | Decoder.derived[(Env.Local : Env)]( |
| 10 | + | Env.Local.$asInstanceOf[ |
| 11 | + | scala.deriving.Mirror.Singleton{ |
| 12 | + | type MirroredMonoType = (Env.Local : Env); type MirroredType = (Env.Local : Env); |
| 13 | + | type MirroredLabel = ("Local" : String) |
| 14 | + | } |
| 15 | + | ], |
| 16 | + | /* missing */summon[Tuple.Map[?1.MirroredElemTypes, Decoder]]), |
| 17 | + | ???) |
| 18 | + | |
| 19 | + |But no implicit values were found that match type Tuple.Map[?1.MirroredElemTypes, Decoder] |
| 20 | + | |
| 21 | + |where: ?1 is an unknown value of type scala.deriving.Mirror.Singleton{ |
| 22 | + | type MirroredMonoType = (Env.Local : Env); type MirroredType = (Env.Local : Env); |
| 23 | + | type MirroredLabel = ("Local" : String) |
| 24 | + |} |
| 25 | + |. |
| 26 | + | |
| 27 | + |Note: a match type could not be fully reduced: |
| 28 | + | |
| 29 | + | trying to reduce Tuple.Map[m.MirroredElemTypes, Decoder] |
| 30 | + | failed since selector m.MirroredElemTypes |
| 31 | + | does not match case EmptyTuple => EmptyTuple |
| 32 | + | and cannot be shown to be disjoint from it either. |
| 33 | + | Therefore, reduction cannot advance to the remaining case |
| 34 | + | |
| 35 | + | case h *: t => Decoder[h] *: Tuple.Map[t, Decoder] |
| 36 | +-- [E172] Type Error: tests/neg/i15183/test_2.scala:5:18 --------------------------------------------------------------- |
| 37 | +5 |enum Env2 derives Decoder: // error |
| 38 | + | ^ |
| 39 | + |No given instance of type Tuple.Map[m.MirroredElemTypes, Decoder] was found for parameter d of given instance derived in object Decoder. |
| 40 | + |I found: |
| 41 | + | |
| 42 | + | Decoder.summonTuple[Env2.Local, (Env2.Sit, Env2.Prod)]( |
| 43 | + | Decoder.derived[Env2.Local]( |
| 44 | + | Env2.Local.$asInstanceOf[ |
| 45 | + | scala.deriving.Mirror.Product{ |
| 46 | + | type MirroredMonoType = Env2.Local; type MirroredType = Env2.Local; type MirroredLabel = ("Local" : String); |
| 47 | + | type MirroredElemTypes = EmptyTuple.type; type MirroredElemLabels = EmptyTuple.type |
| 48 | + | } |
| 49 | + | ], |
| 50 | + | /* missing */summon[Tuple.Map[EmptyTuple.type, Decoder]]), |
| 51 | + | ???) |
| 52 | + | |
| 53 | + |But no implicit values were found that match type Tuple.Map[EmptyTuple.type, Decoder]. |
| 54 | + | |
| 55 | + |Note: a match type could not be fully reduced: |
| 56 | + | |
| 57 | + | trying to reduce Tuple.Map[m.MirroredElemTypes, Decoder] |
| 58 | + | failed since selector m.MirroredElemTypes |
| 59 | + | does not match case EmptyTuple => EmptyTuple |
| 60 | + | and cannot be shown to be disjoint from it either. |
| 61 | + | Therefore, reduction cannot advance to the remaining case |
| 62 | + | |
| 63 | + | case h *: t => Decoder[h] *: Tuple.Map[t, Decoder] |
| 64 | +-- [E172] Type Error: tests/neg/i15183/test_2.scala:10:19 -------------------------------------------------------------- |
| 65 | +10 |enum Shape derives Decoder: // error |
| 66 | + | ^ |
| 67 | + |No given instance of type Tuple.Map[m.MirroredElemTypes, Decoder] was found for parameter d of given instance derived in object Decoder. |
| 68 | + |I found: |
| 69 | + | |
| 70 | + | Decoder.summonTuple[Shape.Rectangle, Shape.Circle *: EmptyTuple.type]( |
| 71 | + | Decoder.derived[Shape.Rectangle]( |
| 72 | + | Shape.Rectangle.$asInstanceOf[ |
| 73 | + | scala.deriving.Mirror.Product{ |
| 74 | + | type MirroredMonoType = Shape.Rectangle; type MirroredType = Shape.Rectangle; |
| 75 | + | type MirroredLabel = ("Rectangle" : String); type MirroredElemTypes = (Double, Double); |
| 76 | + | type MirroredElemLabels = (("width" : String), ("height" : String)) |
| 77 | + | } |
| 78 | + | ], |
| 79 | + | Decoder.summonTuple[Double, Double *: EmptyTuple.type](Decoder.given_Decoder_Double, |
| 80 | + | Decoder.summonTuple[Double, EmptyTuple.type](Decoder.given_Decoder_Double, |
| 81 | + | /* missing */summon[Tuple.Map[EmptyTuple.type, Decoder]]) |
| 82 | + | ) |
| 83 | + | ), |
| 84 | + | ???) |
| 85 | + | |
| 86 | + |But no implicit values were found that match type Tuple.Map[EmptyTuple.type, Decoder]. |
| 87 | + | |
| 88 | + |Note: a match type could not be fully reduced: |
| 89 | + | |
| 90 | + | trying to reduce Tuple.Map[m.MirroredElemTypes, Decoder] |
| 91 | + | failed since selector m.MirroredElemTypes |
| 92 | + | does not match case EmptyTuple => EmptyTuple |
| 93 | + | and cannot be shown to be disjoint from it either. |
| 94 | + | Therefore, reduction cannot advance to the remaining case |
| 95 | + | |
| 96 | + | case h *: t => Decoder[h] *: Tuple.Map[t, Decoder] |
0 commit comments