File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
633
633
/** The tree containing only the top-level classes and objects matching either `cls` or its companion object */
634
634
def sliceTopLevel (tree : Tree , cls : ClassSymbol )(implicit ctx : Context ): List [Tree ] = tree match {
635
635
case PackageDef (pid, stats) =>
636
- cpy.PackageDef (tree)(pid, stats.flatMap(sliceTopLevel(_, cls))) :: Nil
636
+ val slicedStats = stats.flatMap(sliceTopLevel(_, cls))
637
+ if (! slicedStats.isEmpty)
638
+ cpy.PackageDef (tree)(pid, slicedStats) :: Nil
639
+ else
640
+ Nil
637
641
case tdef : TypeDef =>
638
642
val sym = tdef.symbol
639
643
assert(sym.isClass)
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ class FromTastyTests extends ParallelTesting {
47
47
" hklub0.scala" ,
48
48
49
49
// Missing position
50
- " i3000.scala" ,
51
50
" t1203a.scala" ,
52
51
" t2260.scala" ,
53
52
" t4579.scala" ,
You can’t perform that action at this time.
0 commit comments