Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala:通用方法_Scala_Types_Slick - Fatal编程技术网

Scala:通用方法

Scala:通用方法,scala,types,slick,Scala,Types,Slick,我找不到解决这个问题的办法: 这一特点: trait BasicRepository[Schema <: Table[Entity] with Identifiable[Entity], Entity] 这种方法: def insertProfilePart[Schema <: Table[Entity] with Identifiable[Entity], Entity](repository: BasicRepository[Schema, Entity], entities

我找不到解决这个问题的办法:

这一特点:

trait BasicRepository[Schema <: Table[Entity] with Identifiable[Entity], Entity] 
这种方法:

def insertProfilePart[Schema <: Table[Entity] with Identifiable[Entity], Entity](repository: BasicRepository[Schema, Entity], entities: Seq[Entity]) : Seq[Future[Int]]

def insertProfilePart[Schema谢谢你的评论。我太傻了,读不懂,想不起容易的失败


我刚刚向“insertProfilePart”传递了错误的参数…

编译错误是什么?添加到问题:推断的类型参数[persistence.slickSchemas.PhoneNumber,Product with Serializable]不符合方法insertProfilePart的类型参数界限[Schema]我不明白为什么这会给你带来困难。有没有可能创建一个独立的(可编译的)版本的代码来重现错误?然后至少有人可以尝试一下,看看会发生什么。
 object PhoneNumberRepository extends BasicRepository[PhoneNumbers, PhoneNumber] with ProfilePartRepository[PhoneNumbers, PhoneNumber] {
def insertProfilePart[Schema <: Table[Entity] with Identifiable[Entity], Entity](repository: BasicRepository[Schema, Entity], entities: Seq[Entity]) : Seq[Future[Int]]
 inferred type arguments [persistence.slickSchemas.PhoneNumbers,Product with Serializable] do not conform to method insertProfilePart's type parameter bounds [Schema <: persistence.AgnosticDriver.api.Table[Entity] with persistence.slickSchemas.Identifiable[Entity],Entity]