mirror of https://github.com/sbt/sbt.git
Mark inherited definitions in `ShowAPI`.
Mark every inherited definition with `^inherited^` marker. This helps understanding `ShowAPI`s output.
This commit is contained in:
parent
f101bcd3d0
commit
5119ea2574
|
|
@ -213,7 +213,10 @@ trait ShowTypes
|
|||
def show(s: Structure) = {
|
||||
// don't show inherited class like definitions to avoid dealing with cycles
|
||||
val safeInherited = s.inherited.filterNot(_.isInstanceOf[ClassLike])
|
||||
concat(s.parents, t, " with ") + "\n{\n" + lines(safeInherited ++ s.declared, d) + "\n}"
|
||||
val showInherited: Show[Definition] = new Show[Definition] {
|
||||
def show(deff: Definition): String = "^inherited^ " + d.show(deff)
|
||||
}
|
||||
concat(s.parents, t, " with ") + "\n{\n" + lines(safeInherited, showInherited) + "\n" + lines(s.declared, d) + "\n}"
|
||||
}
|
||||
}
|
||||
implicit def showAnnotated(implicit as: Show[Annotation], t: Show[Type]): Show[Annotated] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue