title: How to have a setter in an object?
body: <p>I am trying to add a setter method in an object:</p>
  
  <pre><code>object Foo {
    def foo_=(s: String) = println(s) 
  }
  
  Foo.foo = "test"
  </code></pre>
  
  <p>This does not work as expected, and compiler complains about "value foo is not a member of object Foo".</p>
  
  <p>Why does it not work? How can I make it work, other than make a setter method without <code>_=</code>?</p>