I have many methods like
def foo(..., ..., runFinalizer: Boolean = true)
(implicit finalizer: Finalizer): Result = ...
But when I run scaladoc (using sbt), it doesn't document that runFinalizer
has the default value. This is quite problematic, because users will set the parameter to false
very rarely, and the generated documentation doesn't show it can be omitted.
So far, I have two solutions, neither one completely satisfactory:
runFinalizer
can be omitted inside its @param
block. It helps, but results in duplicating such a sentence in many places in the documentation, and it's possible for users to overlook it.runFinalizers
(with no default value) and one without. But this would unnecessarily double the number of methods and clutter both code and the documentation.It is most likely a bug, occurring only in some cases: SI-4922 Omitted default argument values . I upgraded to Scala 2.10.1. and it's working fine.