@@ -221,7 +221,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
221221 def inform (msg : String ) = reporter.echo(msg)
222222 override def globalError (msg : String ) = reporter.error(NoPosition , msg)
223223 override def warning (msg : String ) =
224- if (settings.fatalWarnings.value ) globalError(msg)
224+ if (settings.fatalWarnings) globalError(msg)
225225 else reporter.warning(NoPosition , msg)
226226
227227 // Getting in front of Predef's asserts to supplement with more info.
@@ -252,7 +252,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
252252 }
253253
254254 @ inline final def ifDebug (body : => Unit ) {
255- if (settings.debug.value )
255+ if (settings.debug)
256256 body
257257 }
258258 /** This is for WARNINGS which should reach the ears of scala developers
@@ -262,7 +262,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
262262 * to make them visually distinct.
263263 */
264264 @ inline final override def devWarning (msg : => String ) {
265- if (settings.developer.value || settings.debug.value )
265+ if (settings.developer || settings.debug)
266266 warning(" !!! " + msg)
267267 else
268268 log(" !!! " + msg) // such warnings always at least logged
@@ -272,7 +272,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
272272 msg + " in " + (currentTime - start) + " ms"
273273
274274 def informComplete (msg : String ): Unit = reporter.withoutTruncating(inform(msg))
275- def informProgress (msg : String ) = if (settings.verbose.value ) inform(" [" + msg + " ]" )
275+ def informProgress (msg : String ) = if (settings.verbose) inform(" [" + msg + " ]" )
276276 def informTime (msg : String , start : Long ) = informProgress(elapsedMessage(msg, start))
277277
278278 def logError (msg : String , t : Throwable ): Unit = ()
@@ -287,7 +287,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
287287 }
288288
289289 @ inline final override def debuglog (msg : => String ) {
290- if (settings.debug.value )
290+ if (settings.debug)
291291 log(msg)
292292 }
293293
@@ -332,7 +332,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
332332 }
333333 }
334334
335- if (settings.verbose.value || settings.Ylogcp .value ) {
335+ if (settings.verbose || settings.Ylogcp ) {
336336 // Uses the "do not truncate" inform
337337 informComplete(" [search path for source files: " + classPath.sourcepaths.mkString(" ," ) + " ]" )
338338 informComplete(" [search path for class files: " + classPath.asClasspathString + " ]" )
@@ -402,7 +402,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
402402 if ((unit ne null ) && unit.exists)
403403 lastSeenSourceFile = unit.source
404404
405- if (settings.debug.value && (settings.verbose.value || currentRun.size < 5 ))
405+ if (settings.debug && (settings.verbose || currentRun.size < 5 ))
406406 inform(" [running phase " + name + " on " + unit + " ]" )
407407
408408 val unit0 = currentUnit
@@ -736,7 +736,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
736736 val maxName = (0 /: phaseNames)(_ max _.length)
737737 val width = maxName min Limit
738738 val maxDesc = MaxCol - (width + 6 ) // descriptions not novels
739- val fmt = if (settings.verbose.value ) s " % ${maxName}s %2s %s%n "
739+ val fmt = if (settings.verbose) s " % ${maxName}s %2s %s%n "
740740 else s " % ${width}. ${width}s %2s %. ${maxDesc}s%n "
741741
742742 val line1 = fmt.format(" phase name" , " id" , " description" )
@@ -1097,7 +1097,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
10971097 val info3 : List [String ] = (
10981098 ( List (" == Enclosing template or block ==" , nodePrinters.nodeToString(enclosing).trim) )
10991099 ++ ( if (tpe eq null ) Nil else List (" == Expanded type of tree ==" , typeDeconstruct.show(tpe)) )
1100- ++ ( if (! settings.debug.value ) Nil else List (" == Current unit body ==" , nodePrinters.nodeToString(currentUnit.body)) )
1100+ ++ ( if (! settings.debug) Nil else List (" == Current unit body ==" , nodePrinters.nodeToString(currentUnit.body)) )
11011101 ++ ( List (errorMessage) )
11021102 )
11031103
@@ -1113,18 +1113,18 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
11131113
11141114 def echoPhaseSummary (ph : Phase ) = {
11151115 /* Only output a summary message under debug if we aren't echoing each file. */
1116- if (settings.debug.value && ! (settings.verbose.value || currentRun.size < 5 ))
1116+ if (settings.debug && ! (settings.verbose || currentRun.size < 5 ))
11171117 inform(" [running phase " + ph.name + " on " + currentRun.size + " compilation units]" )
11181118 }
11191119
11201120 /** Collects for certain classes of warnings during this run. */
11211121 class ConditionalWarning (what : String , option : Settings # BooleanSetting ) {
11221122 val warnings = mutable.LinkedHashMap [Position , String ]()
11231123 def warn (pos : Position , msg : String ) =
1124- if (option.value ) reporter.warning(pos, msg)
1124+ if (option) reporter.warning(pos, msg)
11251125 else if (! (warnings contains pos)) warnings += ((pos, msg))
11261126 def summarize () =
1127- if (warnings.nonEmpty && (option.isDefault || settings.fatalWarnings.value ))
1127+ if (warnings.nonEmpty && (option.isDefault || settings.fatalWarnings))
11281128 warning(" there were %d %s warning(s); re-run with %s for details" .format(warnings.size, what, option.name))
11291129 }
11301130
@@ -1240,7 +1240,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
12401240 def resetProjectClasses (root : Symbol ): Unit = try {
12411241 def unlink (sym : Symbol ) =
12421242 if (sym != NoSymbol ) root.info.decls.unlink(sym)
1243- if (settings.verbose.value ) inform(" [reset] recursing in " + root)
1243+ if (settings.verbose) inform(" [reset] recursing in " + root)
12441244 val toReload = mutable.Set [String ]()
12451245 for (sym <- root.info.decls) {
12461246 if (sym.isInitialized && clearOnNextRun(sym))
@@ -1260,7 +1260,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
12601260 for (fullname <- toReload)
12611261 classPath.findClass(fullname) match {
12621262 case Some (classRep) =>
1263- if (settings.verbose.value ) inform(" [reset] reinit " + fullname)
1263+ if (settings.verbose) inform(" [reset] reinit " + fullname)
12641264 loaders.initializeFromClassPath(root, classRep)
12651265 case _ =>
12661266 }
@@ -1453,7 +1453,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14531453 }
14541454
14551455 def reportCompileErrors () {
1456- if (! reporter.hasErrors && reporter.hasWarnings && settings.fatalWarnings.value )
1456+ if (! reporter.hasErrors && reporter.hasWarnings && settings.fatalWarnings)
14571457 globalError(" No warnings can be incurred under -Xfatal-warnings." )
14581458
14591459 if (reporter.hasErrors) {
@@ -1492,7 +1492,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14921492 def compileUnits (units : List [CompilationUnit ], fromPhase : Phase ) {
14931493 try compileUnitsInternal(units, fromPhase)
14941494 catch { case ex : Throwable =>
1495- val shown = if (settings.verbose.value )
1495+ val shown = if (settings.verbose)
14961496 stackTraceString(ex)
14971497 else
14981498 stackTraceHeadString(ex) // note that error stacktraces do not print in fsc
@@ -1526,14 +1526,14 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
15261526 if (shouldWriteIcode) {
15271527 // Write *.icode files when -Xprint-icode or -Xprint:<some-optimiz-phase> was given.
15281528 writeICode()
1529- } else if ((settings.Xprint containsPhase globalPhase) || settings.printLate.value && runIsAt(cleanupPhase)) {
1529+ } else if ((settings.Xprint containsPhase globalPhase) || settings.printLate && runIsAt(cleanupPhase)) {
15301530 // print trees
1531- if (settings.Xshowtrees .value || settings.XshowtreesCompact .value || settings.XshowtreesStringified .value ) nodePrinters.printAll()
1531+ if (settings.Xshowtrees || settings.XshowtreesCompact || settings.XshowtreesStringified ) nodePrinters.printAll()
15321532 else printAllUnits()
15331533 }
15341534
15351535 // print the symbols presently attached to AST nodes
1536- if (settings.Yshowsyms .value )
1536+ if (settings.Yshowsyms )
15371537 trackerFactory.snapshot()
15381538
15391539 // print members
@@ -1552,7 +1552,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
15521552 runCheckers()
15531553
15541554 // output collected statistics
1555- if (settings.Ystatistics .value )
1555+ if (settings.Ystatistics )
15561556 statistics.print(phase)
15571557
15581558 advancePhase()
@@ -1697,7 +1697,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
16971697 informProgress(" wrote " + file)
16981698 } catch {
16991699 case ex : IOException =>
1700- if (settings.debug.value ) ex.printStackTrace()
1700+ if (settings.debug) ex.printStackTrace()
17011701 globalError(" could not write file " + file)
17021702 }
17031703 })
0 commit comments