diff --git a/compile/api/ClassToAPI.scala b/compile/api/ClassToAPI.scala index 10c863361..f7a2bb25d 100644 --- a/compile/api/ClassToAPI.scala +++ b/compile/api/ClassToAPI.scala @@ -76,8 +76,17 @@ object ClassToAPI private val lzyEmptyTpeArray = lzy(emptyTypeArray) private val lzyEmptyDefArray = lzy(new Array[xsbti.api.Definition](0)) + private def allSuperclasses(t: Type): Seq[Type] = + { + def accumulate(t: Type, accum: Seq[Type] = Seq.empty): Seq[Type] = t match { + case cl: Class[_] => { val s = cl.getGenericSuperclass ; accumulate(s, accum :+ s) } + case _ => accum + } + accumulate(t) + } + def parents(c: Class[_]): Seq[api.Type] = - types(c.getGenericSuperclass +: c.getGenericInterfaces) + types(allSuperclasses(c) ++ c.getGenericInterfaces) def types(ts: Seq[Type]): Array[api.Type] = ts filter (_ ne null) map reference toArray; def upperBounds(ts: Array[Type]): api.Type = new api.Structure(lzy(types(ts)), lzyEmptyDefArray, lzyEmptyDefArray) diff --git a/main/Defaults.scala b/main/Defaults.scala index fd607f0da..c45eb3605 100755 --- a/main/Defaults.scala +++ b/main/Defaults.scala @@ -1277,7 +1277,7 @@ trait BuildExtra extends BuildCommon /** Disables post-compilation hook for determining tests for tab-completion (such as for 'test-only'). * This is useful for reducing test:compile time when not running test. */ - def noTestCompletion(config: Configuration = Test): Setting[_] = inConfig(config)( Seq(definedTests <<= Defaults.detectTests) ).head + def noTestCompletion(config: Configuration = Test): Setting[_] = inConfig(config)( Seq(definedTests <<= detectTests) ).head def filterKeys(ss: Seq[Setting[_]], transitive: Boolean = false)(f: ScopedKey[_] => Boolean): Seq[Setting[_]] = ss filter ( s => f(s.key) && (!transitive || s.dependencies.forall(f)) )