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
There's a spurious "warning: only classes can have declared but undefined members" when defining usecases for members in objects. It appears when typechecking a usecase definition, since objects can't have abstract methods.
Simple walkaround: Add = ??? to your usecase so it's not an abstract member anymore.
$ cat x.scala
objectThing {
/** * @usecase def merge[T, List[T]](l: List[T], r: List[T]): List[(Option[T], Option[T])] */defmerge[T, List[T] <:Traversable[T]](l: List[T], r: List[T])(implicitnth: Nothing):List[(Option[T],Option[T])] =???
}
$ scaladoc x.scala
x.scala:3:warning: only classes can have declared but undefined members
*@usecase defmerge[T, List[T]](l: List[T], r: List[T]):List[(Option[T], Option[T])]
^
warning: there were 1 feature warning(s); re-run with-feature for details
model contains 2 documentable templates
two warnings found
$ diff y.scala x.scala
3c3
<*@usecase defmerge[T, List[T]](l: List[T], r: List[T]):List[(Option[T], Option[T])] =???--->*@usecase defmerge[T, List[T]](l: List[T], r: List[T]):List[(Option[T], Option[T])]
$ scaladoc y.scala
warning: there were 1 feature warning(s); re-run with-feature for details
model contains 2 documentable templates
one warning found
The text was updated successfully, but these errors were encountered:
There's a spurious "warning: only classes can have declared but undefined members" when defining usecases for members in objects. It appears when typechecking a usecase definition, since objects can't have abstract methods.
Simple walkaround: Add
= ???
to your usecase so it's not an abstract member anymore.The text was updated successfully, but these errors were encountered: