|
| 1 | +-- Warning: tests/neg/i13044.scala:50:40 ------------------------------------------------------------------------------- |
| 2 | +50 | implicit def typeSchema: Schema[A] = Schema.gen // error // error |
| 3 | + | ^^^^^^^^^^ |
| 4 | + |Infinite loop in function body |
| 5 | + |{ |
| 6 | + | val SchemaDerivation_this: Schema.type = Schema |
| 7 | + | { |
| 8 | + | val SchemaDerivation_this: (SchemaDerivation_this : Schema.type) = SchemaDerivation_this |
| 9 | + | { |
| 10 | + | val $scrutinee1: |
| 11 | + | scala.deriving.Mirror.Product{ |
| 12 | + | MirroredMonoType = A; MirroredType = A; MirroredLabel = ("A" : String); MirroredElemTypes = (A, B); |
| 13 | + | MirroredElemLabels = (("a" : String), ("b" : String)) |
| 14 | + | } |
| 15 | + | = |
| 16 | + | A.$asInstanceOf[ |
| 17 | + | scala.deriving.Mirror.Product{ |
| 18 | + | MirroredMonoType = A; MirroredType = A; MirroredLabel = ("A" : String); MirroredElemTypes = (A, B); |
| 19 | + | MirroredElemLabels = (("a" : String), ("b" : String)) |
| 20 | + | } |
| 21 | + | ] |
| 22 | + | val m: |
| 23 | + | scala.deriving.Mirror.Product{ |
| 24 | + | MirroredMonoType = A; MirroredType = A; MirroredLabel = ("A" : String); MirroredElemTypes = (A, B); |
| 25 | + | MirroredElemLabels = (("a" : String), ("b" : String)) |
| 26 | + | } |
| 27 | + | = $scrutinee1 |
| 28 | + | lazy val fields: List[Schema[Any]] = |
| 29 | + | { |
| 30 | + | val SchemaDerivation_this: (SchemaDerivation_this : (SchemaDerivation_this : Schema.type)) = |
| 31 | + | SchemaDerivation_this |
| 32 | + | { |
| 33 | + | val builder: Schema[Any] = TestApp.typeSchema.asInstanceOf[Schema[Any]] |
| 34 | + | { |
| 35 | + | val SchemaDerivation_this: |
| 36 | + | (SchemaDerivation_this : (SchemaDerivation_this : (SchemaDerivation_this : Schema.type))) |
| 37 | + | = SchemaDerivation_this |
| 38 | + | ( |
| 39 | + | { |
| 40 | + | val builder: Schema[Any] = |
| 41 | + | { |
| 42 | + | val SchemaDerivation_this: Schema.type = Schema |
| 43 | + | ( |
| 44 | + | { |
| 45 | + | val SchemaDerivation_this: (SchemaDerivation_this : Schema.type) = SchemaDerivation_this |
| 46 | + | { |
| 47 | + | val $scrutinee4: |
| 48 | + | scala.deriving.Mirror.Product{ |
| 49 | + | MirroredMonoType = B; MirroredType = B; MirroredLabel = ("B" : String); |
| 50 | + | MirroredElemTypes = C *: EmptyTuple.type |
| 51 | + | ; MirroredElemLabels = ("c" : String) *: EmptyTuple.type |
| 52 | + | } |
| 53 | + | = |
| 54 | + | B.$asInstanceOf[ |
| 55 | + | scala.deriving.Mirror.Product{ |
| 56 | + | MirroredMonoType = B; MirroredType = B; MirroredLabel = ("B" : String); |
| 57 | + | MirroredElemTypes = C *: EmptyTuple.type |
| 58 | + | ; MirroredElemLabels = ("c" : String) *: EmptyTuple.type |
| 59 | + | } |
| 60 | + | ] |
| 61 | + | val m: |
| 62 | + | scala.deriving.Mirror.Product{ |
| 63 | + | MirroredMonoType = B; MirroredType = B; MirroredLabel = ("B" : String); |
| 64 | + | MirroredElemTypes = C *: EmptyTuple.type |
| 65 | + | ; MirroredElemLabels = ("c" : String) *: EmptyTuple.type |
| 66 | + | } |
| 67 | + | = $scrutinee4 |
| 68 | + | lazy val fields: List[Schema[Any]] = |
| 69 | + | { |
| 70 | + | val SchemaDerivation_this: |
| 71 | + | (SchemaDerivation_this : (SchemaDerivation_this : Schema.type)) |
| 72 | + | = SchemaDerivation_this |
| 73 | + | { |
| 74 | + | val builder: Schema[Any] = |
| 75 | + | { |
| 76 | + | val SchemaDerivation_this: Schema.type = Schema |
| 77 | + | ( |
| 78 | + | { |
| 79 | + | val SchemaDerivation_this: (...SchemaDerivation_this : ....type) = |
| 80 | + | SchemaDerivation_this |
| 81 | + | { |
| 82 | + | val $scrutinee6: |
| 83 | + | ...{ |
| 84 | + | MirroredMonoType...; MirroredType...; MirroredLabel...; |
| 85 | + | MirroredElemTypes... |
| 86 | + | ; MirroredElemLabels... |
| 87 | + | } |
| 88 | + | = ....$asInstanceOf[...] |
| 89 | + | val m: ... = ...$scrutinee6 |
| 90 | + | lazy val fields: ... = |
| 91 | + | { |
| 92 | + | val SchemaDerivation_this: ... = ... |
| 93 | + | ...:... |
| 94 | + | } |
| 95 | + | { |
| 96 | + | final class $anon() extends ...(), ... { |
| 97 | + | def build: ... = ... |
| 98 | + | } |
| 99 | + | ...():... |
| 100 | + | } |
| 101 | + | }:...[...] |
| 102 | + | } |
| 103 | + | :Schema[C]) |
| 104 | + | }.asInstanceOf[Schema[Any]] |
| 105 | + | SchemaDerivation_this.recurse[EmptyTuple.type].::[Schema[Any]](builder) |
| 106 | + | }:List[Schema[Any]] |
| 107 | + | } |
| 108 | + | { |
| 109 | + | final class $anon() extends Object(), Schema[B] { |
| 110 | + | def build: B = ??? |
| 111 | + | } |
| 112 | + | new Object with Schema[B] {...}():Schema[B] |
| 113 | + | } |
| 114 | + | }:Schema[B] |
| 115 | + | } |
| 116 | + | :Schema[B]) |
| 117 | + | }.asInstanceOf[Schema[Any]] |
| 118 | + | SchemaDerivation_this.recurse[EmptyTuple.type].::[Schema[Any]](builder) |
| 119 | + | } |
| 120 | + | :List[Schema[Any]]) |
| 121 | + | }.::[Schema[Any]](builder) |
| 122 | + | }:List[Schema[Any]] |
| 123 | + | } |
| 124 | + | { |
| 125 | + | final class $anon() extends Object(), Schema[A] { |
| 126 | + | def build: A = ??? |
| 127 | + | } |
| 128 | + | new Object with Schema[A] {...}():Schema[A] |
| 129 | + | } |
| 130 | + | }:Schema[A] |
| 131 | + | }:Schema[A] |
| 132 | + |} |
1 | 133 | -- Error: tests/neg/i13044.scala:50:40 ---------------------------------------------------------------------------------
|
2 | 134 | 50 | implicit def typeSchema: Schema[A] = Schema.gen // error // error
|
3 | 135 | | ^^^^^^^^^^
|
|
0 commit comments