How to specialize on a type projection in Scala?

前端 未结 2 1274
情深已故
情深已故 2020-12-31 11:52

Statement of the question

Consider a type T that contains an abstract type member A:

trait T {
  type A
}
         


        
2条回答
  •  不思量自难忘°
    2020-12-31 12:40

    I can't see how that could possibly work. Specialization is done when compiling the class, and, at that time, A isn't known.

提交回复
热议问题