Scala forward reference extends over definition of value x

Problem is that can not find the function we call. Try put the function top of it. Or still not work then define as lazy value. If it is referenced somewhere and scalac is confused with the sequence, making it lazy could do the trick Example:

def functionA() {
     functionB()
}

def functionB() {
     return 1;
}

function A might complain about functionB is not avaible.