You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/reference/contextual/derivation.md
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,16 @@ new Mirror.Product:
119
119
newLeaf(...)
120
120
```
121
121
122
+
If a Mirror cannot be generated automatically for a given type, an error will appear explaining why it is neither a supported
123
+
sum type nor a product type. For example, if `A` is a trait that is not sealed,
124
+
125
+
```
126
+
No given instance of type deriving.Mirror.Of[A] was found for parameter x of method summon in object Predef. Failed to synthesize an instance of type deriving.Mirror.Of[A]:
127
+
* trait A is not a generic product because it is not a case class
128
+
* trait A is not a generic sum because it is not a sealed trait
129
+
```
130
+
131
+
122
132
Note the following properties of `Mirror` types,
123
133
124
134
+ Properties are encoded using types rather than terms. This means that they have no runtime footprint unless used and
0 commit comments