@@ -321,7 +321,7 @@ class Semantic {
321321 def widenArgs : List [Value ] = values.map(_.widenArg).toList
322322
323323 extension (value : Value )
324- def select (field : Symbol , source : Tree , needResolve : Boolean = true ): Contextual [Result ] = log(" select " + field.show, printer, res => res. asInstanceOf [ Result ] .show) {
324+ def select (field : Symbol , source : Tree , needResolve : Boolean = true ): Contextual [Result ] = log(" select " + field.show, printer, ( _ : Result ) .show) {
325325 if promoted.isCurrentObjectPromoted then Result (Hot , Nil )
326326 else value match {
327327 case Hot =>
@@ -371,7 +371,7 @@ class Semantic {
371371 }
372372 }
373373
374- def call (meth : Symbol , args : List [ArgInfo ], superType : Type , source : Tree , needResolve : Boolean = true ): Contextual [Result ] = log(" call " + meth.show + " , args = " + args, printer, res => res. asInstanceOf [ Result ] .show) {
374+ def call (meth : Symbol , args : List [ArgInfo ], superType : Type , source : Tree , needResolve : Boolean = true ): Contextual [Result ] = log(" call " + meth.show + " , args = " + args, printer, ( _ : Result ) .show) {
375375 def checkArgs = args.flatMap(_.promote)
376376
377377 // fast track if the current object is already initialized
@@ -445,7 +445,7 @@ class Semantic {
445445 }
446446
447447 /** Handle a new expression `new p.C` where `p` is abstracted by `value` */
448- def instantiate (klass : ClassSymbol , ctor : Symbol , args : List [ArgInfo ], source : Tree ): Contextual [Result ] = log(" instantiating " + klass.show + " , value = " + value + " , args = " + args, printer, res => res. asInstanceOf [ Result ] .show) {
448+ def instantiate (klass : ClassSymbol , ctor : Symbol , args : List [ArgInfo ], source : Tree ): Contextual [Result ] = log(" instantiating " + klass.show + " , value = " + value + " , args = " + args, printer, ( _ : Result ) .show) {
449449 val trace1 = trace.add(source)
450450 if promoted.isCurrentObjectPromoted then Result (Hot , Nil )
451451 else value match {
@@ -702,7 +702,7 @@ class Semantic {
702702 *
703703 * This method only handles cache logic and delegates the work to `cases`.
704704 */
705- def eval (expr : Tree , thisV : Addr , klass : ClassSymbol , cacheResult : Boolean = false ): Contextual [Result ] = log(" evaluating " + expr.show + " , this = " + thisV.show, printer, res => res. asInstanceOf [ Result ] .show) {
705+ def eval (expr : Tree , thisV : Addr , klass : ClassSymbol , cacheResult : Boolean = false ): Contextual [Result ] = log(" evaluating " + expr.show + " , this = " + thisV.show, printer, ( _ : Result ) .show) {
706706 val innerMap = cache.getOrElseUpdate(thisV, new EqHashMap [Tree , Value ])
707707 if (innerMap.contains(expr)) Result (innerMap(expr), Errors .empty)
708708 else {
@@ -911,7 +911,7 @@ class Semantic {
911911 }
912912
913913 /** Handle semantics of leaf nodes */
914- def cases (tp : Type , thisV : Addr , klass : ClassSymbol , source : Tree ): Contextual [Result ] = log(" evaluating " + tp.show, printer, res => res. asInstanceOf [ Result ] .show) {
914+ def cases (tp : Type , thisV : Addr , klass : ClassSymbol , source : Tree ): Contextual [Result ] = log(" evaluating " + tp.show, printer, ( _ : Result ) .show) {
915915 tp match {
916916 case _ : ConstantType =>
917917 Result (Hot , Errors .empty)
@@ -941,7 +941,7 @@ class Semantic {
941941 }
942942
943943 /** Resolve C.this that appear in `klass` */
944- def resolveThis (target : ClassSymbol , thisV : Value , klass : ClassSymbol , source : Tree ): Contextual [Value ] = log(" resolving " + target.show + " , this = " + thisV.show + " in " + klass.show, printer, res => res. asInstanceOf [ Value ] .show) {
944+ def resolveThis (target : ClassSymbol , thisV : Value , klass : ClassSymbol , source : Tree ): Contextual [Value ] = log(" resolving " + target.show + " , this = " + thisV.show + " in " + klass.show, printer, ( _ : Value ) .show) {
945945 if target == klass then thisV
946946 else if target.is(Flags .Package ) then Hot
947947 else
@@ -969,7 +969,7 @@ class Semantic {
969969 *
970970 * See `tpd.outerSelect` and `ElimOuterSelect`.
971971 */
972- def resolveOuterSelect (target : ClassSymbol , thisV : Value , hops : Int , source : Tree ): Contextual [Value ] = log(" resolving outer " + target.show + " , this = " + thisV.show + " , hops = " + hops, printer, res => res. asInstanceOf [ Value ] .show) {
972+ def resolveOuterSelect (target : ClassSymbol , thisV : Value , hops : Int , source : Tree ): Contextual [Value ] = log(" resolving outer " + target.show + " , this = " + thisV.show + " , hops = " + hops, printer, ( _ : Value ) .show) {
973973 // Is `target` reachable from `cls` with the given `hops`?
974974 def reachable (cls : ClassSymbol , hops : Int ): Boolean =
975975 if hops == 0 then cls == target
@@ -1011,7 +1011,7 @@ class Semantic {
10111011 else cases(tref.prefix, thisV, klass, source)
10121012
10131013 /** Initialize part of an abstract object in `klass` of the inheritance chain */
1014- def init (tpl : Template , thisV : Addr , klass : ClassSymbol ): Contextual [Result ] = log(" init " + klass.show, printer, res => res. asInstanceOf [ Result ] .show) {
1014+ def init (tpl : Template , thisV : Addr , klass : ClassSymbol ): Contextual [Result ] = log(" init " + klass.show, printer, ( _ : Result ) .show) {
10151015 val errorBuffer = new mutable.ArrayBuffer [Error ]
10161016
10171017 val paramsMap = tpl.constr.termParamss.flatten.map { vdef =>
0 commit comments