Aladdin - Scala Bugtracking
[#532] project: nsc priority: high category: bug
submitter assigned to status date submitted
Gilles Martin fixed 2006-02-15 14:49:14.0
subject Assignement to local variable in typed code fails type-checking
code
object Test extends Application {
  import scala.reflect._;
  def titi: Unit = {
    var truc = 0
    val tata: TypedCode[()=>Unit] = () => {
      truc = 6
    }
    ()
  }
}
what happened
test.scala:6 error: type mismatch;
 found   : scala.Int
 required: scala.reflect.Code
      truc = 6
      ^
what expected No error.
[back to overview]
Changes of this bug report
Martin  edited on  2006-02-17 16:31:35.0