Skip to content

Commit

Permalink
Add code comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jul 6, 2018
1 parent 69c0dde commit e67594a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ object ScalaReflection extends ScalaReflection {
*/
def definedByConstructorParams(tpe: Type): Boolean = cleanUpReflectionObjects {
tpe.dealias match {
// `Option` is a `Product`, but we don't wanna treat `Option[Int]` as a struct type.
case t if t <:< localTypeOf[Option[_]] => definedByConstructorParams(t.typeArgs.head)
case _ => tpe.dealias <:< localTypeOf[Product] ||
tpe.dealias <:< localTypeOf[DefinedByConstructorParams]
Expand Down

0 comments on commit e67594a

Please sign in to comment.