Skip to content

Commit 237490d

Browse files
nicolasstuckijulienrf
authored andcommitted
Update reflect fields API
1 parent fc305bd commit 237490d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/typeable/src/main/scala/shapeless3/typeable/typeable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ object TypeableMacros {
279279

280280
def mkCaseClassTypeable = {
281281
val sym = target.classSymbol.get
282-
val fields = sym.fields
282+
val fields = sym.declaredFields
283283
val caseFields = sym.caseFields.filter(f => fields.contains(f))
284284
def fieldTpe(f: Symbol) = f.tree match {
285285
case tree: ValDef => tree.tpt.tpe
286286
}
287-
if (!sym.fields.forall(f => caseFields.contains(f) || !isAbstract(fieldTpe(f)))) {
287+
if (!fields.forall(f => caseFields.contains(f) || !isAbstract(fieldTpe(f)))) {
288288
report.throwError(s"No Typeable for case class ${target.show} with non-case fields")
289289
} else {
290290
val fieldTps = caseFields.map(f => target.memberType(f))

0 commit comments

Comments
 (0)