错误:找不到参数gen的隐含值:shapeless.Generic

时间:2016-06-08 06:09:45

标签: scala shapeless

为无形无法编写这个简单的代码

import shapeless._
import shapeless.ops.hlist._

case class Person(name: String, age: Int)
val genPerson = Generic[Person]

但是得到编译错误

<console>:21: error: could not find implicit value for parameter gen: shapeless.Generic[Person]
       val genPerson = Generic[Person]

0 个答案:

没有答案