Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.31 KB | None | 0 0
  1. package payment.model
  2.  
  3. import net.liftweb.mapper._
  4. trait PaymentableMapper[OwnerType <: PaymentableMapper[OwnerType]]
  5.         extends LongKeyedMapper[OwnerType] {
  6.     self: OwnerType =>
  7.     def paid: Unit
  8. }
  9.  
  10. trait PaymentableMetaMapper[OwnerType <: PaymentableMapper[OwnerType]]
  11.         extends LongKeyedMetaMapper[OwnerType] {
  12.     self: OwnerType =>
  13. }
  14.  
  15. abstract class MappedPaymentable[T <: Mapper[T], P <: PaymentableMetaMapper[_]](owner: T, paymentable: => P)
  16.         extends MappedLongForeignKey(owner, paymentable)
  17.  
  18. //[info]   Source analysis: 1 new/modified, 0 indirectly invalidated, 0 removed.
  19. //[info] Compiling main sources...
  20. //[error] /.../PaymentableMapper.scala:15: 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)
  21. //[error]  --- because ---
  22. //[error] argument expression's type is not compatible with formal parameter type;
  23. //[error]  found   : P
  24. //[error]  required: net.liftweb.mapper.KeyedMetaMapper[Long,?O]
  25. //[error] abstract class MappedPaymentable[T <: Mapper[T], P <: PaymentableMetaMapper[_]](owner: T, paymentable: => P)
  26. //[error]                                                                                ^
  27. //[error] one error found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement