1

Possible Duplicates:
Zip Code Database
Scala: can't write setter without getter?

class Person {
 def age_= (val value:Int) {  }
}
object Main { 
  def main( args : Array[String] ) { 
    val s = new Person()
    s.age = 10
  }
}

I thought Scala gave special treatment to bla_= by allowing it to be used as foo.bar = baz

Community
  • 1
  • 1
OscarRyz
  • 196,001
  • 113
  • 385
  • 569
  • 2
    See http://stackoverflow.com/questions/2447132/scala-cant-write-setter-without-getter – VonC Jan 11 '11 at 07:56

0 Answers0