File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -844,17 +844,17 @@ object TypeOps:
844844 val singletons = util.HashMap [Symbol , SingletonType ]()
845845 val gadtSyms = new mutable.ListBuffer [Symbol ]
846846
847- def traverse (tp : Type ) = {
847+ def traverse (tp : Type ) = try
848848 val tpd = tp.dealias
849849 if tpd ne tp then traverse(tpd)
850850 else tp match
851- case tp : ThisType if ! tp.tref.symbol.isStaticOwner && ! singletons.contains( tp.tref.symbol) =>
851+ case tp : ThisType if ! singletons.contains( tp.tref.symbol) && ! tp.tref.symbol.isStaticOwner =>
852852 singletons(tp.tref.symbol) = tp
853853 traverseChildren(tp.tref)
854854 case tp : TermRef if tp.symbol.is(Param ) =>
855855 singletons(tp.typeSymbol) = tp
856856 traverseChildren(tp)
857- case tp : TypeRef if tp.symbol.isAbstractOrParamType =>
857+ case tp : TypeRef if ! gadtSyms.contains(tp.symbol) && tp.symbol.isAbstractOrParamType =>
858858 gadtSyms += tp.symbol
859859 traverseChildren(tp)
860860 // traverse abstract type infos, to add any singletons
@@ -863,7 +863,7 @@ object TypeOps:
863863 traverseChildren(tp.info)
864864 case _ =>
865865 traverseChildren(tp)
866- }
866+ catch case ex : Throwable => handleRecursive( " traverseTp2 " , tp.show, ex)
867867 TraverseTp2 .traverse(tp2)
868868 val singletons = TraverseTp2 .singletons
869869 val gadtSyms = TraverseTp2 .gadtSyms.toList
You can’t perform that action at this time.
0 commit comments