File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/reflect/scala/reflect/internal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -902,14 +902,19 @@ trait Definitions extends api.StandardDefinitions {
902902 }
903903 }
904904 }
905+ def isVolatileTypeRef (tr : TypeRef ) = {
906+ val dealised = tr.dealias
907+ if (dealised ne tr) isVolatile(dealised)
908+ else if (tr.sym.isAbstractType) isVolatileAbstractType
909+ else false
910+ }
905911
906912 tp match {
907913 case ThisType (_) => false
908914 case SingleType (_, sym) => isVolatile(tp.underlying) && (sym.hasVolatileType || ! sym.isStable)
909915 case NullaryMethodType (restpe) => isVolatile(restpe)
910916 case PolyType (_, restpe) => isVolatile(restpe)
911- case TypeRef (_, _, _) if tp ne tp.dealias => isVolatile(tp.dealias)
912- case TypeRef (_, sym, _) if sym.isAbstractType => isVolatileAbstractType
917+ case tr : TypeRef => isVolatileTypeRef(tr)
913918 case RefinedType (_, _) => isVolatileRefinedType
914919 case TypeVar (origin, _) => isVolatile(origin)
915920 case _ : SimpleTypeProxy => isVolatile(tp.underlying)
You can’t perform that action at this time.
0 commit comments