title: Scala compiler error: "identifier expected but integer literal found". Why?
body: <p>The code is obvious, and I fail to see what's wrong with it.</p>
  
  <pre><code>object TestX extends App {
  
    val l= List[String]( "a","b","c" )
    val n= l.size
  
    def f( i:Int )= l[(i+1)%n ]
  }
  </code></pre>
  
  <p>Compiler output (Scala 2.9.2):</p>
  
  <pre>
    fsc -deprecation -d bin src/xxx.scala
    src/xxx.scala:11: error: identifier expected but integer literal found.
      def f( i:Int )= l[(i+1)%n]
                           ^
  </pre>