@@ -12,7 +12,6 @@ import Phases._
12
12
import Symbols ._
13
13
import Flags .Module
14
14
import reporting .{ThrowingReporter , Profile }
15
- import typer .Nullables
16
15
import collection .mutable
17
16
import scala .concurrent .{Future , Await , ExecutionContext }
18
17
import scala .concurrent .duration .Duration
@@ -50,7 +49,7 @@ class Pickler extends Phase {
50
49
private val beforePickling = new mutable.HashMap [ClassSymbol , String ]
51
50
private val picklers = new mutable.HashMap [ClassSymbol , TastyPickler ]
52
51
53
- private val typeSimplifier = new TypeSimplifyTransformer
52
+ private val typeSimplifier = new TypeSimplifier
54
53
55
54
/** Drop any elements of this list that are linked module classes of other elements in the list */
56
55
private def dropCompanionModuleClasses (clss : List [ClassSymbol ])(using Context ): List [ClassSymbol ] = {
@@ -69,7 +68,7 @@ class Pickler extends Phase {
69
68
do
70
69
val pickler = new TastyPickler (cls)
71
70
if ctx.settings.YtestPickler .value then
72
- beforePickling(cls) = typeSimplifier.transform( tree) .show
71
+ beforePickling(cls) = tree.show
73
72
picklers(cls) = pickler
74
73
val treePkl = new TreePickler (pickler)
75
74
treePkl.pickle(tree :: Nil )
@@ -157,10 +156,10 @@ class Pickler extends Phase {
157
156
158
157
// Overwrite types of If, Match, and Try nodes with simplified types
159
158
// to avoid inconsistencies in unsafe nulls
160
- class TypeSimplifyTransformer extends TreeMapWithPreciseStatContexts :
159
+ class TypeSimplifier extends TreeMapWithPreciseStatContexts :
161
160
override def transform (tree : Tree )(using Context ): Tree =
162
161
try tree match
163
- case _ : If | _ : Match | _ : Try if Nullables .unsafeNullsEnabled =>
162
+ case _ : If | _ : Match | _ : Try =>
164
163
val newTree = super .transform(tree)
165
164
newTree.overwriteType(newTree.tpe.simplified)
166
165
newTree
@@ -170,5 +169,5 @@ class Pickler extends Phase {
170
169
case ex : TypeError =>
171
170
report.error(ex, tree.srcPos)
172
171
tree
173
- end TypeSimplifyTransformer
172
+ end TypeSimplifier
174
173
}
0 commit comments