What is a non-method-local var in Scala?

scala

Solution

A method local variable is a local variable declared in the scope of a method.

Consequently a non-method-local variable ought to be a variable with a wider scope, such as class scope.

Can't tell for sure why one would say that they are problematic. Perhaps it is simply due to the fact that they introduce a mutable state in objects.

Problem

In the comments to Scala Sink or Swim Josh Sureth calls out non-method-local vars as a cause of problems in Scala code. That page is the only Google hit for the phrase `non-method-local vars`, so what does it mean, and what is the problem?

Original source