Skip to content

Commit

Permalink
fix ProductFormats reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudolph committed Sep 9, 2021
1 parent 97c7c7d commit fbd903b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ trait ProductFormats extends ProductFormatsInstances {
_.getName.drop("copy$default$".length).takeWhile(_ != '(').toInt)
val fields = clazz.getDeclaredFields.filterNot { f =>
import Modifier._
(f.getModifiers & (TRANSIENT | STATIC | 0x1000 /* SYNTHETIC*/ )) > 0
(f.getModifiers & (TRANSIENT | STATIC | 0x1000 /* SYNTHETIC*/ )) > 0 || f.getName.endsWith("$outer")
}
if (copyDefaultMethods.length != fields.length)
sys.error("Case class " + clazz.getName + " declares additional fields")
Expand Down

0 comments on commit fbd903b

Please sign in to comment.