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 following file compiles nicely with scalac, but makes scaladoc complain about an error (tested with Scala 2.8.1 and the 2011-02-24 nightly):
packageorg.example// A randomly chosen Java annotation with corresponding enum:importjava.lang.annotation.{Retention, RetentionPolicy}
// The enum used as a constant in this annotation will be make// scaladoc signal an error.@Retention(value=RetentionPolicy.SOURCE)
objectDummy {}
The scaladoc output says that it found one error:
$$ scaladoc Dummy.scala
Dummy.scala:8:error: annotation argument needs to be a constant; found: RetentionPolicy.SOURCE@Retention(value=RetentionPolicy.SOURCE)
^
model contains 0 documentable templates
one error found
As the annotation+enum used here is part of the JDK, and not something I've whipped together myself, I don't think this is a duplicate of bug #2764 (especially considering comments 30 and 31 in that bug).
The text was updated successfully, but these errors were encountered:
@paulp said:
(In r24642) Modified some typer logic to allow annotation arguments for constants
which don't have the form Literal(_). The current logic seems to be
avoided most of the time, but scaladoc breaks when it runs into it.
This closes #4301. I can't figure out from the ticket what the deal
is with #2764 and what is presently happening, but it seems like this
patch could only improve the situation. Review by rytz.
The following file compiles nicely with scalac, but makes scaladoc complain about an error (tested with Scala 2.8.1 and the 2011-02-24 nightly):
The scaladoc output says that it found one error:
As the annotation+enum used here is part of the JDK, and not something I've whipped together myself, I don't think this is a duplicate of bug #2764 (especially considering comments 30 and 31 in that bug).
The text was updated successfully, but these errors were encountered: