You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @throws annotation on a primary constructor gets associated with the class instead of a method, and is then ignored when generating bytecode. A patch which appears sufficient to remedy this is attached.
The text was updated successfully, but these errors were encountered:
@paulp said:
I'm sorry I didn't figure that out. I realize I shouldn't be relying too much on anything but the spec, but it'd be nice if an example of this syntax could be added to http://www.scala-lang.org/node/106 . The existing examples all put the annotation on a line by itself (which I did try) but it doesn't parse.
jon:scala-2.7.2.RC3 paulp$$ cat /tmp/an.scala
caseclassB@throws(classOf[java.io.IOException])(i: Int)
jon:scala-2.7.2.RC3 paulp$$ bin/scalac /tmp/an.scala
/tmp/an.scala:2:error: expected start of definition
@throws(classOf[java.io.IOException])(i: Int)
^
one error found
The @throws annotation on a primary constructor gets associated with the class instead of a method, and is then ignored when generating bytecode. A patch which appears sufficient to remedy this is attached.
The text was updated successfully, but these errors were encountered: