This page is no longer maintained — Please continue to the home page at www.scala-lang.org

scaladoc of type members

1 reply
Matthew Pocock 3
Joined: 2010-07-30,
User offline. Last seen 42 years 45 weeks ago.
Hi,
I have the following code:
package object graph {  /** A graph where nodes, edges and links between these can be checked with instances to see if they are in these    * collections.   */  type QueryableMembershipGraph[G, V, E] = Graph[G, V, E] {
    /** The collection type is an indicator function. */     type Col[A] <: A => Boolean
  }}
This compiles but does not scaladoc. It bails with "error: only declarations allowed here" pointing to the doc on Col. Is this an oversight or intended behaviour? Depending, I need to submit a bug report either to scaladoc or the intellij scala plugin :)
Matthew
--
Dr Matthew PocockIntegrative Bioinformatics Group, School of Computing Science, Newcastle Universitymailto: turingatemyhamster@gmail.com gchat: turingatemyhamster@gmail.commsn: matthew_pocock@yahoo.co.uk irc.freenode.net: drdozerskype: matthew.pococktel: (0191) 2566550mob: +447535664143
dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: scaladoc of type members
The concept of scaladoc for "members" of a type is very strange to me. A type is just an alias. In this case, it is an alias to Graph[G, V, E] with the structural type { type Col[A] <: A => Boolean }, so it doesn't make sense to put a scaladoc on that.

On Fri, Dec 23, 2011 at 13:47, Matthew Pocock <turingatemyhamster@gmail.com> wrote:
Hi,
I have the following code:
package object graph {  /** A graph where nodes, edges and links between these can be checked with instances to see if they are in these    * collections.   */  type QueryableMembershipGraph[G, V, E] = Graph[G, V, E] {
    /** The collection type is an indicator function. */     type Col[A] <: A => Boolean
  }}
This compiles but does not scaladoc. It bails with "error: only declarations allowed here" pointing to the doc on Col. Is this an oversight or intended behaviour? Depending, I need to submit a bug report either to scaladoc or the intellij scala plugin :)
Matthew
--
Dr Matthew PocockIntegrative Bioinformatics Group, School of Computing Science, Newcastle Universitymailto: turingatemyhamster@gmail.com gchat: turingatemyhamster@gmail.commsn: matthew_pocock@yahoo.co.uk irc.freenode.net: drdozerskype: matthew.pococktel: (0191) 2566550mob: +447535664143



--
Daniel C. Sobral

I travel to the future all the time.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland