Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.17 KB | None | 0 0
  1. trait PaymentableMapper[OwnerType <: PaymentableMapper[OwnerType]]
  2.     extends LongKeyedMapper[OwnerType] {
  3.     self: OwnerType =>
  4.     def paid: Unit
  5. }
  6.  
  7. trait PaymentableMetaMapper[OwnerType <: PaymentableMapper[OwnerType]]
  8.     extends LongKeyedMetaMapper[OwnerType] {
  9.     self: OwnerType =>
  10. }
  11.  
  12. abstract class MappedPaymentable[T <: Mapper[T], P <: PaymentableMetaMapper[_]]
  13.     (owner: T, paymentable: => P) extends MappedLongForeignKey(owner, paymentable)
  14.  
  15. ERROR:
  16. [info] Compiling main sources...
  17. [error] /.../.../PaymentableMapper.scala:14: no type parameters for constructor MappedLongForeignKey: (theOwner: T,_foreignMeta: => net.liftweb.mapper.KeyedMetaMapper[Long,O])net.liftweb.mapper.MappedLongForeignKey[T,O] exist so that it can be applied to arguments (T, P)
  18. [error]  --- because ---
  19. [error] argument expression's type is not compatible with formal parameter type;
  20. [error]  found   : P
  21. [error]  required: net.liftweb.mapper.KeyedMetaMapper[Long,?O]
  22. [error] abstract class MappedPaymentable[T <: Mapper[T], P <: PaymentableMetaMapper[_]](owner: T, paymentable: => P)
  23. [error]                                                                                ^
  24. [error] one error found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement