Aladdin - Scala Bugtracking
[#1195] project: compiler priority: low category: bug
submitter assigned to status date submitted
Burak _ _ 2007-07-03 18:04:08.0
subject crash for malformed annotations
code
object Foo {
  @throws(classOf(java.net.MalformedURLException))
  def bar() {}
}
what happened
Burak-Emirs-MacBook-Pro:~/Documents/svn/scala buraq$ ./build/quick/bin/scalac -d /tmp /tmp/bugparam.scala 
/tmp/bugparam.scala:2: error: scala.this.Predef.classOf[T] does not take parameters
  @throws(classOf(java.net.MalformedURLException))
                 ^
Exception in thread "main" java.lang.Error: no-symbol does not have owner
        at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:1400)
        at scala.tools.nsc.transform.SymbolReifier$class.reify(SymbolReifier.scala:24)
        at scala.tools.nsc.transform.LiftCode$Reifier.reify(LiftCode.scala:176)
        at scala.tools.nsc.transform.LiftCode$Reifier.reify(LiftCode.scala:76)
...
what expected no crash; the program has an error, it should be classOf[...] not (...)
[back to overview]
Changes of this bug report
Burak  edited on  2007-07-03 18:05:01.0
more precise "what expected"