Super constructor cannot be passed a self reference unless parameter is declared by-name

后端 未结 1 1141
小蘑菇
小蘑菇 2021-01-27 10:38

Well, I have something like this:

trait A

class Serving(a: => A)

object App extends Serving(App.Main) {
  object Main extends A
}

And I ge

相关标签:
1条回答
  • 2021-01-27 11:04

    Your code compiles just fine in Scala 2.8.1, even if the parameter is not declared by-name.

    0 讨论(0)
提交回复
热议问题