What does “Forward reference extends over definition of value” mean in Scala?

前端 未结 7 2187
一个人的身影
一个人的身影 2020-12-10 00:20

I keep getting

Forward reference extends over definition of value a

error while trying to compile my application (inside SBT).

7条回答
  •  眼角桃花
    2020-12-10 01:02

    The error message means that you have a forward reference to a method, i.e. you're calling a method before you define it, and that the definition of the value x appears between that forward reference and the definition of the method. It is only legal to have forward references if there are no value definition between the reference and the referred method definiton.

提交回复
热议问题