summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actors/scala/actors/Actor.scala4
-rw-r--r--src/actors/scala/actors/Combinators.scala2
-rw-r--r--src/actors/scala/actors/IScheduler.scala2
-rw-r--r--src/actors/scala/actors/remote/TcpService.scala4
-rw-r--r--src/attic/scala/tools/nsc/models/SemanticTokens.scala4
-rw-r--r--src/compiler/scala/tools/ant/Same.scala2
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Break.scala2
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Make.scala2
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala18
-rw-r--r--src/compiler/scala/tools/nsc/NoPhase.scala2
-rw-r--r--src/compiler/scala/tools/nsc/Phase.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreePrinters.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala12
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala8
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/ICodes.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Members.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Printers.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/DataFlowAnalysis.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala8
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/doclet/Generator.scala4
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/Doclet.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala4
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/Power.scala2
-rw-r--r--src/compiler/scala/tools/nsc/io/AbstractFile.scala4
-rw-r--r--src/compiler/scala/tools/nsc/io/Jar.scala2
-rw-r--r--src/compiler/scala/tools/nsc/io/PlainFile.scala4
-rw-r--r--src/compiler/scala/tools/nsc/io/VirtualDirectory.scala4
-rw-r--r--src/compiler/scala/tools/nsc/io/VirtualFile.scala4
-rw-r--r--src/compiler/scala/tools/nsc/io/ZipArchive.scala4
-rw-r--r--src/compiler/scala/tools/nsc/javac/JavaScanners.scala12
-rw-r--r--src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala4
-rw-r--r--src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/reporters/StoreReporter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/settings/MutableSettings.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala8
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/OverridingPairs.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Analyzer.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Duplicators.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/util/ClassPath.scala4
-rw-r--r--src/compiler/scala/tools/nsc/util/JavaCharArrayReader.scala2
-rw-r--r--src/compiler/scala/tools/util/Which.scala5
-rw-r--r--src/dbc/scala/dbc/Database.scala4
-rw-r--r--src/detach/library/scala/runtime/RemoteRef.scala2
-rw-r--r--src/detach/plugin/scala/tools/detach/Detach.scala8
-rw-r--r--src/library/scala/collection/immutable/Vector.scala2
-rw-r--r--src/library/scala/collection/mutable/ArrayStack.scala2
-rw-r--r--src/library/scala/collection/mutable/FlatHashTable.scala4
-rw-r--r--src/library/scala/collection/mutable/HashTable.scala4
-rw-r--r--src/library/scala/collection/mutable/ObservableBuffer.scala6
-rw-r--r--src/library/scala/collection/mutable/ObservableMap.scala2
-rw-r--r--src/library/scala/collection/mutable/ObservableSet.scala2
-rw-r--r--src/library/scala/collection/mutable/OpenHashMap.scala4
-rw-r--r--src/library/scala/collection/mutable/PriorityQueue.scala2
-rw-r--r--src/library/scala/collection/mutable/RevertibleHistory.scala2
-rw-r--r--src/library/scala/collection/parallel/ParIterableLike.scala8
-rw-r--r--src/library/scala/collection/parallel/Tasks.scala32
-rw-r--r--src/library/scala/collection/parallel/immutable/ParHashMap.scala2
-rw-r--r--src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala2
-rw-r--r--src/library/scala/compat/Platform.scala2
-rw-r--r--src/library/scala/concurrent/Lock.scala4
-rw-r--r--src/library/scala/concurrent/pilib.scala4
-rw-r--r--src/library/scala/reflect/ScalaBeanInfo.scala2
-rw-r--r--src/library/scala/sys/process/ProcessImpl.scala2
-rw-r--r--src/library/scala/testing/Benchmark.scala4
-rw-r--r--src/library/scala/util/control/Breaks.scala2
-rw-r--r--src/library/scala/util/parsing/ast/Binders.scala4
-rw-r--r--src/library/scala/xml/dtd/ContentModelParser.scala2
-rw-r--r--src/library/scala/xml/dtd/Scanner.scala4
-rw-r--r--src/library/scala/xml/parsing/MarkupParserCommon.scala6
-rw-r--r--src/library/scala/xml/persistent/CachedFileStorage.scala6
-rwxr-xr-xsrc/library/scala/xml/pull/XMLEventReader.scala2
-rw-r--r--src/partest/scala/tools/partest/nest/ConsoleRunner.scala2
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala2
-rw-r--r--src/partest/scala/tools/partest/package.scala2
-rw-r--r--src/scalacheck/org/scalacheck/Prop.scala2
-rw-r--r--src/scalacheck/org/scalacheck/Properties.scala2
-rw-r--r--src/scalap/scala/tools/scalap/CodeWriter.scala2
-rw-r--r--src/scalap/scala/tools/scalap/JavaWriter.scala4
-rw-r--r--src/scalap/scala/tools/scalap/MetaParser.scala2
-rw-r--r--src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala2
-rw-r--r--src/swing/scala/swing/Component.scala2
-rw-r--r--src/swing/scala/swing/Container.scala2
-rw-r--r--src/swing/scala/swing/MainFrame.scala2
-rw-r--r--src/swing/scala/swing/Publisher.scala2
-rw-r--r--src/swing/scala/swing/TextField.scala4
-rw-r--r--src/swing/scala/swing/UIElement.scala4
-rw-r--r--test/files/buildmanager/t3054/foo/Foo.scala2
-rw-r--r--test/files/buildmanager/t4215/A.scala2
-rw-r--r--test/files/continuations-neg/lazy.check4
-rw-r--r--test/files/continuations-neg/lazy.scala4
-rw-r--r--test/files/neg/accesses.check16
-rw-r--r--test/files/neg/accesses.scala32
-rw-r--r--test/files/neg/bug1960.check2
-rw-r--r--test/files/neg/bug1960.scala2
-rw-r--r--test/files/neg/bug630.scala4
-rw-r--r--test/files/neg/patmatexhaust.scala6
-rw-r--r--test/files/neg/t2910.check2
-rw-r--r--test/files/neg/t2910.scala4
-rw-r--r--test/files/neg/tailrec.scala2
-rw-r--r--test/files/res/bug722/Parser.scala2
-rw-r--r--test/files/res/bug722/ScanBased.scala4
-rw-r--r--test/files/res/bug785/ScalaNewTyper.scala2
120 files changed, 237 insertions, 238 deletions
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala
index 059ab3abf7..25cfbf7865 100644
--- a/src/actors/scala/actors/Actor.scala
+++ b/src/actors/scala/actors/Actor.scala
@@ -95,7 +95,7 @@ object Actor extends Combinators {
* This permits to re-use the current thread as an actor
* even if its <code>ActorProxy</code> has died for some reason.
*/
- def resetProxy {
+ def resetProxy() {
val a = tl.get
if ((null ne a) && a.isInstanceOf[ActorProxy])
tl.set(new ActorProxy(Thread.currentThread, parentScheduler))
@@ -110,7 +110,7 @@ object Actor extends Combinators {
* a thread pool). Permanent references in thread-local storage
* are a potential memory leak.
*/
- def clearSelf {
+ def clearSelf() {
tl.set(null)
}
diff --git a/src/actors/scala/actors/Combinators.scala b/src/actors/scala/actors/Combinators.scala
index 9d63af61f9..5276c7843e 100644
--- a/src/actors/scala/actors/Combinators.scala
+++ b/src/actors/scala/actors/Combinators.scala
@@ -41,6 +41,6 @@ private[actors] trait Combinators {
* of the next loop iteration when invoked inside the body of `loop`
* or `loopWhile`.
*/
- def continue: Unit = throw new KillActorControl
+ def continue(): Unit = throw new KillActorControl
}
diff --git a/src/actors/scala/actors/IScheduler.scala b/src/actors/scala/actors/IScheduler.scala
index 865ead58a0..2bb90a5fa7 100644
--- a/src/actors/scala/actors/IScheduler.scala
+++ b/src/actors/scala/actors/IScheduler.scala
@@ -77,6 +77,6 @@ trait IScheduler {
def onLockup(millis: Int)(handler: () => Unit) {}
@deprecated("this member is going to be removed in a future release", "2.7.7")
- def printActorDump {}
+ def printActorDump() {}
}
diff --git a/src/actors/scala/actors/remote/TcpService.scala b/src/actors/scala/actors/remote/TcpService.scala
index b310478457..d156443fcb 100644
--- a/src/actors/scala/actors/remote/TcpService.scala
+++ b/src/actors/scala/actors/remote/TcpService.scala
@@ -222,7 +222,7 @@ private[actors] class TcpServiceWorker(parent: TcpService, so: Socket) extends T
parent.serializer.writeObject(dataout, parent.node)
}
- def readNode {
+ def readNode() {
val node = parent.serializer.readObject(datain)
node match {
case n: Node =>
@@ -240,7 +240,7 @@ private[actors] class TcpServiceWorker(parent: TcpService, so: Socket) extends T
var running = true
- def halt = synchronized {
+ def halt() = synchronized {
so.close()
running = false
}
diff --git a/src/attic/scala/tools/nsc/models/SemanticTokens.scala b/src/attic/scala/tools/nsc/models/SemanticTokens.scala
index edbc13ccdc..6c2fe79d77 100644
--- a/src/attic/scala/tools/nsc/models/SemanticTokens.scala
+++ b/src/attic/scala/tools/nsc/models/SemanticTokens.scala
@@ -648,11 +648,11 @@ class SemanticTokens(val compiler: Global) {
var token: Token = end
var offset: Int = 0
- def next: Unit = if (token == end) end else {
+ def next(): Unit = if (token == end) end else {
offset = offset + token.length
token = token.next
}
- def prev: Unit = if (token.prev == begin) token else {
+ def prev(): Unit = if (token.prev == begin) token else {
offset = offset - token.prev.length
token = token.prev
}
diff --git a/src/compiler/scala/tools/ant/Same.scala b/src/compiler/scala/tools/ant/Same.scala
index 988bb4c315..52bc440756 100644
--- a/src/compiler/scala/tools/ant/Same.scala
+++ b/src/compiler/scala/tools/ant/Same.scala
@@ -89,7 +89,7 @@ class Same extends ScalaMatchingTask {
private var allEqualNow = true
/** Tests if all mandatory attributes are set and valid. */
- private def validateAttributes = {
+ private def validateAttributes() = {
if (origin.isEmpty) sys.error("Mandatory attribute 'dir' is not set.")
if (destination.isEmpty) sys.error("Mandatory attribute 'todir' is not set.")
}
diff --git a/src/compiler/scala/tools/ant/sabbus/Break.scala b/src/compiler/scala/tools/ant/sabbus/Break.scala
index 3c5000a30b..91dab5b0ee 100644
--- a/src/compiler/scala/tools/ant/sabbus/Break.scala
+++ b/src/compiler/scala/tools/ant/sabbus/Break.scala
@@ -19,7 +19,7 @@ class Break extends Task {
private var id: Option[String] = None
- override def execute {
+ override def execute() {
if (id.isEmpty) sys.error("Attribute 'id' is not set")
Compilers.break(id.get)
}
diff --git a/src/compiler/scala/tools/ant/sabbus/Make.scala b/src/compiler/scala/tools/ant/sabbus/Make.scala
index bf6b39d401..75cd0105ac 100644
--- a/src/compiler/scala/tools/ant/sabbus/Make.scala
+++ b/src/compiler/scala/tools/ant/sabbus/Make.scala
@@ -13,7 +13,7 @@ import java.io.File
import org.apache.tools.ant.Task
class Make extends Task with TaskArgs {
- override def execute {
+ override def execute() {
if (id.isEmpty) sys.error("Mandatory attribute 'id' is not set.")
if (compilerPath.isEmpty) sys.error("Mandatory attribute 'compilerpath' is not set.")
val settings = new Settings
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 2e2f9c1ad7..b8f9fea3ef 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -289,7 +289,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
abstract class GlobalPhase(prev: Phase) extends Phase(prev) {
phaseWithId(id) = this
- def run {
+ def run() {
echoPhaseSummary(this)
currentRun.units foreach applyPhase
}
@@ -738,7 +738,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
/** take note that phase is completed
* (for progress reporting)
*/
- def advancePhase {
+ def advancePhase() {
unitc = 0
phasec += 1
refreshProgress
@@ -746,18 +746,18 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
/** take note that a phase on a unit is completed
* (for progress reporting)
*/
- def advanceUnit {
+ def advanceUnit() {
unitc += 1
refreshProgress
}
- def cancel { reporter.cancelled = true }
+ def cancel() { reporter.cancelled = true }
- private var phasec: Int = 0 // phases completed
- private var unitc: Int = 0 // units completed this phase
- private def currentProgress = (phasec * size) + unitc
- private def totalProgress = (phaseDescriptors.size - 1) * size // -1: drops terminal phase
- private def refreshProgress = if (size > 0) progress(currentProgress, totalProgress)
+ private var phasec: Int = 0 // phases completed
+ private var unitc: Int = 0 // units completed this phase
+ private def currentProgress = (phasec * size) + unitc
+ private def totalProgress = (phaseDescriptors.size - 1) * size // -1: drops terminal phase
+ private def refreshProgress() = if (size > 0) progress(currentProgress, totalProgress)
// ----- finding phases --------------------------------------------
diff --git a/src/compiler/scala/tools/nsc/NoPhase.scala b/src/compiler/scala/tools/nsc/NoPhase.scala
index 92e5fceaa5..a74d14acf7 100644
--- a/src/compiler/scala/tools/nsc/NoPhase.scala
+++ b/src/compiler/scala/tools/nsc/NoPhase.scala
@@ -7,5 +7,5 @@ package scala.tools.nsc
object NoPhase extends Phase(null) {
def name = "<no phase>"
- def run { throw new Error("NoPhase.run") }
+ def run() { throw new Error("NoPhase.run") }
}
diff --git a/src/compiler/scala/tools/nsc/Phase.scala b/src/compiler/scala/tools/nsc/Phase.scala
index 95b0d82ee8..f79b7c4367 100644
--- a/src/compiler/scala/tools/nsc/Phase.scala
+++ b/src/compiler/scala/tools/nsc/Phase.scala
@@ -39,7 +39,7 @@ abstract class Phase(val prev: Phase) {
def flatClasses: Boolean = false
def refChecked: Boolean = false
def keepsTypeParams = true
- def run: Unit
+ def run(): Unit
override def toString() = name
override def hashCode = id.## + name.##
diff --git a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
index b8c3e12ee6..ef2906de06 100644
--- a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
@@ -41,8 +41,8 @@ trait TreePrinters { trees: SymbolTable =>
def flush() = out.flush()
- def indent = indentMargin += indentStep
- def undent = indentMargin -= indentStep
+ def indent() = indentMargin += indentStep
+ def undent() = indentMargin -= indentStep
protected def doPrintPositions = settings.Xprintpos.value
def printPosition(tree: Tree) = if (doPrintPositions) print(tree.pos.show)
diff --git a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
index bfd5b175a7..0948e072b4 100644
--- a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
+++ b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
@@ -203,7 +203,7 @@ abstract class ScalaPrimitives {
private val primitives: mutable.Map[Symbol, Int] = new mutable.HashMap()
/** Initialize the primitive map */
- def init {
+ def init() {
primitives.clear()
// scala.Any
addPrimitive(Any_==, EQ)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
index 3d08e8734d..2c29bf9f1f 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
@@ -206,7 +206,7 @@ trait BasicBlocks {
/** Remove the last instruction of this basic block. It is
* fast for an open block, but slower when the block is closed.
*/
- def removeLastInstruction {
+ def removeLastInstruction() {
if (closed)
removeInstructionsAt(size)
else {
@@ -301,7 +301,7 @@ trait BasicBlocks {
}
/** Close the block */
- def close {
+ def close() {
assert(!closed || ignore)
assert(instructionList.nonEmpty, "Empty block.")
closed = true
@@ -310,7 +310,7 @@ trait BasicBlocks {
instrs = instructionList.toArray
}
- def open {
+ def open() {
assert(closed)
closed = false
ignore = false
@@ -318,7 +318,7 @@ trait BasicBlocks {
instructionList = instructionList.reverse // prepare for appending to the head
}
- def clear {
+ def clear() {
instructionList = Nil
instrs = null
preds = null
@@ -330,11 +330,11 @@ trait BasicBlocks {
* added to this basic block. It makes the generation of THROW
* and RETURNs easier.
*/
- def enterIgnoreMode = {
+ def enterIgnoreMode() = {
ignore = true
}
- def exitIgnoreMode {
+ def exitIgnoreMode() {
assert(ignore, "Exit ignore mode when not in ignore mode.")
ignore = false
}
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 13340f7f08..8c7997157e 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -48,7 +48,7 @@ abstract class GenICode extends SubComponent {
var unit: CompilationUnit = _
- override def run {
+ override def run() {
scalaPrimitives.init
classes.clear
super.run
@@ -1489,7 +1489,7 @@ abstract class GenICode extends SubComponent {
log("Entering genCond with tree: " + tree);
// the default emission
- def default = {
+ def default() = {
val ctx1 = genLoad(tree, ctx, BOOL)
ctx1.bb.closeWith(CZJUMP(thenCtx.bb, elseCtx.bb, NE, BOOL) setPos tree.pos)
}
@@ -1998,11 +1998,11 @@ abstract class GenICode extends SubComponent {
new Context(this) setBasicBlock block
}
- def enterScope = {
+ def enterScope() {
scope = new Scope(scope)
}
- def exitScope = {
+ def exitScope() {
if (bb.nonEmpty) {
scope.locals foreach { lv => bb.emit(SCOPE_EXIT(lv)) }
}
diff --git a/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala b/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
index b3e5001192..f29618c7cf 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
@@ -86,7 +86,7 @@ abstract class ICodeCheckers {
checkerDebug(msg)
}
- def checkICodes: Unit = {
+ def checkICodes(): Unit = {
if (settings.verbose.value)
println("[[consistency check at the beginning of phase " + globalPhase.name + "]]")
classes.values foreach check
diff --git a/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala b/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala
index c1f9481a0e..9c7c9e5010 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala
@@ -61,7 +61,7 @@ abstract class ICodes extends AnyRef
/** Print all classes and basic blocks. Used for debugging. */
- def dump {
+ def dump() {
if (alreadyDumping) return
else alreadyDumping = true
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Members.scala b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
index 69258c9ecb..92107565f9 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Members.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
@@ -198,7 +198,7 @@ trait Members { self: ICodes =>
override def toString() = symbol.fullName
import opcodes._
- def checkLocals: Unit = {
+ def checkLocals(): Unit = {
def localsSet = code.blocks.flatten collect {
case LOAD_LOCAL(l) => l
case STORE_LOCAL(l) => l
@@ -218,7 +218,7 @@ trait Members { self: ICodes =>
*
* This method should be most effective after heavy inlining.
*/
- def normalize: Unit = if (this.code ne null) {
+ def normalize(): Unit = if (this.code ne null) {
val nextBlock: mutable.Map[BasicBlock, BasicBlock] = mutable.HashMap.empty
for (b <- code.blocks.toList
if b.successors.length == 1;
@@ -251,7 +251,7 @@ trait Members { self: ICodes =>
checkValid(this)
}
- def dump {
+ def dump() {
val printer = new TextPrinter(new PrintWriter(Console.out, true),
new DumpLinearizer)
printer.printMethod(this)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Printers.scala b/src/compiler/scala/tools/nsc/backend/icode/Printers.scala
index e9c288cdfa..958a708111 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Printers.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Printers.scala
@@ -26,8 +26,8 @@ trait Printers { self: ICodes =>
def setWriter(w: PrintWriter) { out = w }
- def indent { margin += TAB }
- def undent { margin -= TAB }
+ def indent() { margin += TAB }
+ def undent() { margin -= TAB }
def print(s: String) { out.print(s) }
def print(o: Any) { print(o.toString()) }
@@ -37,7 +37,7 @@ trait Printers { self: ICodes =>
println
}
- def println {
+ def println() {
out.println()
var i = 0
while (i < margin) {
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala
index ee3b579145..e1e9360e43 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala
@@ -212,7 +212,7 @@ abstract class CopyPropagation {
}
}
- override def run {
+ override def run() {
forwardAnalysis(blockTransfer)
if (settings.debug.value) {
linearizer.linearize(method).foreach(b => if (b != method.code.startBlock)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/DataFlowAnalysis.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/DataFlowAnalysis.scala
index 8c4aca19cf..60cb679782 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/DataFlowAnalysis.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/DataFlowAnalysis.scala
@@ -43,7 +43,7 @@ trait DataFlowAnalysis[L <: SemiLattice] {
f
}
- def run: Unit
+ def run(): Unit
/** Implements forward dataflow analysis: the transfer function is
* applied when inputs to a Program point change, to obtain the new
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala
index c8d9005ff4..7d96c72d2b 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala
@@ -74,7 +74,7 @@ abstract class Liveness {
Pair(genSet, killSet)
}
- override def run {
+ override def run() {
backwardAnalysis(blockTransfer)
if (settings.debug.value) {
linearizer.linearize(method).foreach(b => if (b != method.code.startBlock)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala
index 8e1d0e58a7..31a2dbfbec 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala
@@ -142,7 +142,7 @@ abstract class ReachingDefinitions {
(drops, stackOut)
}
- override def run {
+ override def run() {
forwardAnalysis(blockTransfer)
if (settings.debug.value) {
linearizer.linearize(method).foreach(b => if (b != method.code.startBlock)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
index 11ed9557fd..0826a7676f 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
@@ -627,11 +627,11 @@ abstract class TypeFlowAnalysis {
private var lastStart = 0L
- def reset {
+ def reset() {
millis = 0L
}
- def start {
+ def start() {
lastStart = System.currentTimeMillis
}
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index 1a485ebb27..a7c2b2abd3 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -828,7 +828,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
}
}
- def addModuleInstanceField {
+ def addModuleInstanceField() {
jclass.addNewField(PublicStaticFinal,
nme.MODULE_INSTANCE_FIELD.toString,
jclass.getType())
@@ -1077,7 +1077,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
}
/** Generate exception handlers for the current method. */
- def genExceptionHandlers {
+ def genExceptionHandlers() {
/** Return a list of pairs of intervals where the handler is active.
* The intervals in the list have to be inclusive in the beginning and
diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
index d593a13d8b..1968ca56aa 100644
--- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
+++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
@@ -36,7 +36,7 @@ abstract class GenMSIL extends SubComponent {
override def erasedTypes = true
- override def run {
+ override def run() {
if (settings.debug.value) inform("[running phase " + name + " on icode]")
val codeGenerator = new BytecodeGenerator
@@ -784,7 +784,7 @@ abstract class GenMSIL extends SubComponent {
/** There might be open handlers, but no more blocks. happens when try/catch end
* with `throw` or `return`
- * def foo { try { .. throw } catch { _ => .. throw } }
+ * def foo() { try { .. throw } catch { _ => .. throw } }
*
* In this case we need some code after the catch block for the auto-generated
* `leave` instruction. So we're adding a (dead) `throw new Exception`.
@@ -1091,7 +1091,7 @@ abstract class GenMSIL extends SubComponent {
// we're generating a constructor (method: IMethod is a constructor), and we're
// calling another constructor of the same class.
- // @LUC TODO: this can probably break, namely when having: class A { def this { new A() } }
+ // @LUC TODO: this can probably break, namely when having: class A { def this() { new A() } }
// instead, we should instruct the CALL_METHOD with additional information, know whether it's
// an instance creation constructor call or not.
mcode.Emit(OpCodes.Call, constructorInfo)
@@ -1114,7 +1114,7 @@ abstract class GenMSIL extends SubComponent {
var doEmit = true
getTypeOpt(msym.owner) match {
case Some(typ) if (typ.IsEnum) => {
- def negBool = {
+ def negBool() = {
mcode.Emit(OpCodes.Ldc_I4_0)
mcode.Emit(OpCodes.Ceq)
}
diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
index e1774523a5..d176ef43e3 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
@@ -131,7 +131,7 @@ abstract class DeadCodeElimination extends SubComponent {
/** Mark useful instructions. Instructions in the worklist are each inspected and their
* dependencies are marked useful too, and added to the worklist.
*/
- def mark {
+ def mark() {
// log("Starting with worklist: " + worklist)
while (!worklist.isEmpty) {
val (bb, idx) = worklist.iterator.next
diff --git a/src/compiler/scala/tools/nsc/doc/doclet/Generator.scala b/src/compiler/scala/tools/nsc/doc/doclet/Generator.scala
index 2caf67ee78..735b79c336 100644
--- a/src/compiler/scala/tools/nsc/doc/doclet/Generator.scala
+++ b/src/compiler/scala/tools/nsc/doc/doclet/Generator.scala
@@ -19,12 +19,12 @@ abstract class Generator {
mutable.Set.empty[()=>Boolean]
/** Outputs documentation (as a side effect). */
- def generate: Unit = {
+ def generate(): Unit = {
assert(checks forall { check => check() })
generateImpl
}
/** Outputs documentation (as a side effect). This method is called only if all `checks` are true. */
- protected def generateImpl: Unit
+ protected def generateImpl(): Unit
}
diff --git a/src/compiler/scala/tools/nsc/doc/html/Doclet.scala b/src/compiler/scala/tools/nsc/doc/html/Doclet.scala
index a16fc920c6..035a6e3dfa 100644
--- a/src/compiler/scala/tools/nsc/doc/html/Doclet.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/Doclet.scala
@@ -6,7 +6,7 @@ import doclet._
/** * The default doclet used by the scaladoc command line tool when no user-provided doclet is provided. */
class Doclet extends Generator with Universer with Indexer {
- def generateImpl {
+ def generateImpl() {
new html.HtmlFactory(universe, index).generate
}
diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala
index 8d260c2889..7e1be90d3d 100644
--- a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala
@@ -24,7 +24,7 @@ class HtmlFactory(val universe: doc.Universe, index: doc.Index) {
/** Generates the Scaladoc site for a model into the site root. A scaladoc site is a set of HTML and related files
* that document a model extracted from a compiler run.
* @param model The model to generate in the form of a sequence of packages. */
- def generate : Unit = {
+ def generate() {
def copyResource(subPath: String) {
val bytes = new Streamable.Bytes {
diff --git a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala
index 38ad73686a..f78365a7a8 100644
--- a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala
+++ b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala
@@ -94,7 +94,7 @@ abstract class InteractiveTest {
adjustPaths(settings.bootclasspath, settings.classpath, settings.javabootclasspath, settings.sourcepath)
}
- protected def printClassPath {
+ protected def printClassPath() {
println("\toutDir: %s".format(outDir.path))
println("\tbaseDir: %s".format(baseDir.path))
println("\targsString: %s".format(argsString))
@@ -229,7 +229,7 @@ abstract class InteractiveTest {
reload.get
}
- def runTest: Unit = {
+ def runTest(): Unit = {
if (runRandomTests) randomTests(20, sourceFiles)
completionTests()
typeAtTests()
diff --git a/src/compiler/scala/tools/nsc/interpreter/Power.scala b/src/compiler/scala/tools/nsc/interpreter/Power.scala
index c2f72e9f37..14d6613abd 100644
--- a/src/compiler/scala/tools/nsc/interpreter/Power.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/Power.scala
@@ -280,7 +280,7 @@ abstract class Power[G <: Global](
class PrintingConvenience[T: Prettifier](value: T) {
val pretty = implicitly[Prettifier[T]]
- def > { >(_ => true) }
+ def >() { >(_ => true) }
def >(s: String): Unit = >(_ contains s)
def >(r: Regex): Unit = >(_ matches r.pattern.toString)
def >(p: String => Boolean): Unit = pretty.grep(value, p)
diff --git a/src/compiler/scala/tools/nsc/io/AbstractFile.scala b/src/compiler/scala/tools/nsc/io/AbstractFile.scala
index 54f74beb2c..12a632fca6 100644
--- a/src/compiler/scala/tools/nsc/io/AbstractFile.scala
+++ b/src/compiler/scala/tools/nsc/io/AbstractFile.scala
@@ -114,10 +114,10 @@ abstract class AbstractFile extends AnyRef with Iterable[AbstractFile] {
def isClassContainer = isDirectory || (sfile exists (Path isJarOrZip _))
/** Create a file on disk, if one does not exist already. */
- def create: Unit
+ def create(): Unit
/** Delete the underlying file or directory (recursively). */
- def delete: Unit
+ def delete(): Unit
/** Is this abstract file a directory? */
def isDirectory: Boolean
diff --git a/src/compiler/scala/tools/nsc/io/Jar.scala b/src/compiler/scala/tools/nsc/io/Jar.scala
index bd7dbde5ec..e8eab682fc 100644
--- a/src/compiler/scala/tools/nsc/io/Jar.scala
+++ b/src/compiler/scala/tools/nsc/io/Jar.scala
@@ -82,7 +82,7 @@ class JarWriter(file: File, val manifest: Manifest = new Manifest()) {
}
private def transfer(in: InputStream, out: OutputStream) = {
val buf = new Array[Byte](10240)
- def loop: Unit = in.read(buf, 0, buf.length) match {
+ def loop(): Unit = in.read(buf, 0, buf.length) match {
case -1 => in.close()
case n => out.write(buf, 0, n) ; loop
}
diff --git a/src/compiler/scala/tools/nsc/io/PlainFile.scala b/src/compiler/scala/tools/nsc/io/PlainFile.scala
index 9e7b6d6655..ce4bca490f 100644
--- a/src/compiler/scala/tools/nsc/io/PlainFile.scala
+++ b/src/compiler/scala/tools/nsc/io/PlainFile.scala
@@ -76,10 +76,10 @@ class PlainFile(val givenPath: Path) extends AbstractFile {
}
/** Does this abstract file denote an existing file? */
- def create: Unit = if (!exists) givenPath.createFile()
+ def create(): Unit = if (!exists) givenPath.createFile()
/** Delete the underlying file or directory (recursively). */
- def delete: Unit =
+ def delete(): Unit =
if (givenPath.isFile) givenPath.delete()
else if (givenPath.isDirectory) givenPath.toDirectory.deleteRecursively()
diff --git a/src/compiler/scala/tools/nsc/io/VirtualDirectory.scala b/src/compiler/scala/tools/nsc/io/VirtualDirectory.scala
index 66ff9e6011..0bcb2de43f 100644
--- a/src/compiler/scala/tools/nsc/io/VirtualDirectory.scala
+++ b/src/compiler/scala/tools/nsc/io/VirtualDirectory.scala
@@ -31,10 +31,10 @@ extends AbstractFile {
override def output = sys.error("directories cannot be written")
/** Does this abstract file denote an existing file? */
- def create { unsupported }
+ def create() { unsupported }
/** Delete the underlying file or directory (recursively). */
- def delete { unsupported }
+ def delete() { unsupported }
/** Returns an abstract file with the given name. It does not
* check that it exists.
diff --git a/src/compiler/scala/tools/nsc/io/VirtualFile.scala b/src/compiler/scala/tools/nsc/io/VirtualFile.scala
index d7176364c0..4a8aa1a69d 100644
--- a/src/compiler/scala/tools/nsc/io/VirtualFile.scala
+++ b/src/compiler/scala/tools/nsc/io/VirtualFile.scala
@@ -78,10 +78,10 @@ class VirtualFile(val name: String, _path: String) extends AbstractFile
}
/** Does this abstract file denote an existing file? */
- def create { unsupported }
+ def create() { unsupported }
/** Delete the underlying file or directory (recursively). */
- def delete { unsupported }
+ def delete() { unsupported }
/**
* Returns the abstract file in this abstract directory with the
diff --git a/src/compiler/scala/tools/nsc/io/ZipArchive.scala b/src/compiler/scala/tools/nsc/io/ZipArchive.scala
index cba92d813f..22121cc714 100644
--- a/src/compiler/scala/tools/nsc/io/ZipArchive.scala
+++ b/src/compiler/scala/tools/nsc/io/ZipArchive.scala
@@ -285,8 +285,8 @@ final class URLZipArchive(url: URL) extends AbstractFile with ZipContainer {
/** Methods we don't support but have to implement because of the design */
def file: JFile = null
- def create: Unit = unsupported
- def delete: Unit = unsupported
+ def create(): Unit = unsupported
+ def delete(): Unit = unsupported
def output = unsupported
def container = unsupported
diff --git a/src/compiler/scala/tools/nsc/javac/JavaScanners.scala b/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
index c600f6364b..ed5ebb1a01 100644
--- a/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
+++ b/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
@@ -63,7 +63,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
var errpos: ScanPosition
var lastPos: ScanPosition
def skipToken: ScanPosition
- def nextToken: Unit
+ def nextToken(): Unit
def next: AbstractJavaTokenData
def intVal(negated: Boolean): Long
def floatVal(negated: Boolean): Double
@@ -282,7 +282,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
p - 1
}
- def nextToken {
+ def nextToken() {
if (next.token == EMPTY) {
fetchToken()
}
@@ -648,7 +648,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
// Identifiers ---------------------------------------------------------------
- private def getIdentRest {
+ private def getIdentRest() {
while (true) {
(in.ch: @switch) match {
case 'A' | 'B' | 'C' | 'D' | 'E' |
@@ -734,7 +734,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
/** read fractional part and exponent of floating point number
* if one is present.
*/
- protected def getFraction {
+ protected def getFraction() {
token = DOUBLELIT
while ('0' <= in.ch && in.ch <= '9') {
putChar(in.ch)
@@ -823,7 +823,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
}
/** read a number into name and set base
*/
- protected def getNumber {
+ protected def getNumber() {
while (digit2int(in.ch, if (base < 10) 10 else base) >= 0) {
putChar(in.ch)
in.next
@@ -905,7 +905,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
/** INIT: read lookahead character and token.
*/
- def init {
+ def init() {
in.next
nextToken
}
diff --git a/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala b/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala
index 2ffaa1c80a..7d2c0fe424 100644
--- a/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala
+++ b/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala
@@ -16,7 +16,7 @@ import scala.tools.nsc.util.Position
abstract class AbstractReporter extends Reporter {
private val positions = new HashMap[Position, Severity]
- override def reset {
+ override def reset() {
super.reset
positions.clear
}
@@ -27,7 +27,7 @@ abstract class AbstractReporter extends Reporter {
private def isPromptSet = settings.prompt.value
def display(pos: Position, msg: String, severity: Severity): Unit
- def displayPrompt: Unit
+ def displayPrompt(): Unit
protected def info0(pos: Position, msg: String, _severity: Severity, force: Boolean) {
val severity =
diff --git a/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala b/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala
index 93e6f77dbd..75c25afa5b 100644
--- a/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala
+++ b/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala
@@ -94,7 +94,7 @@ class ConsoleReporter(val settings: Settings, reader: BufferedReader, writer: Pr
print(pos, msg, severity)
}
- def displayPrompt: Unit = try {
+ def displayPrompt(): Unit = try {
var continue = true
while (continue) {
writer.print("r)esume, a)bort: ")
diff --git a/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala b/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala
index bc08478490..9f0e55c422 100644
--- a/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala
+++ b/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala
@@ -27,7 +27,7 @@ class StoreReporter extends Reporter {
}
}
- override def reset {
+ override def reset() {
super.reset
infos.clear
}
diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
index adb580af7f..5772d9f7b1 100644
--- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
@@ -400,7 +400,7 @@ class MutableSettings(val errorFn: String => Unit) extends AbsSettings with Scal
}
}
- def errorMsg = errorFn("invalid setting for -"+name+" "+getValidText)
+ def errorMsg() = errorFn("invalid setting for -"+name+" "+getValidText)
def tryToSet(args: List[String]) =
if (args.isEmpty) errorAndValue("missing argument", None)
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 9f666e008f..005a3c87ed 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -798,7 +798,7 @@ trait Definitions extends reflect.generic.StandardDefinitions {
sym
}
- def init {
+ def init() {
if (isInitialized) return
EmptyPackageClass setInfo ClassInfoType(Nil, new Scope, EmptyPackageClass)
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index b69a62ee80..a63eb92e6c 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -665,7 +665,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable =>
final def setFlag(mask: Long): this.type = { rawflags = rawflags | mask; this }
final def resetFlag(mask: Long): this.type = { rawflags = rawflags & ~mask; this }
final def getFlag(mask: Long): Long = flags & mask
- final def resetFlags { rawflags = rawflags & TopLevelCreationFlags }
+ final def resetFlags() { rawflags = rawflags & TopLevelCreationFlags }
/** The class or term up to which this symbol is accessible,
* or RootClass if it is public.
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 3e41df45f8..7f2a7f42bd 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -2263,7 +2263,7 @@ A type's typeSymbol should never be inspected directly.
tv.suspended = true
suspended += tv
}
- def resumeAll: Unit = {
+ def resumeAll(): Unit = {
for(tv <- suspended) {
tv.suspended = false
}
@@ -3788,7 +3788,7 @@ A type's typeSymbol should never be inspected directly.
*/
object commonOwnerMap extends TypeMap {
var result: Symbol = _
- def init = { result = NoSymbol }
+ def init() = { result = NoSymbol }
def apply(tp: Type): Type = {
assert(tp ne null)
tp.normalize match {
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index a1ff7d99ef..db2a06e255 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -108,7 +108,7 @@ abstract class ClassfileParser {
protected def statics: Symbol = staticModule.moduleClass
- private def parseHeader {
+ private def parseHeader() {
val magic = in.nextInt
if (magic != JAVA_MAGIC)
throw new IOException("class file '" + in.file + "' "
@@ -1095,7 +1095,7 @@ abstract class ClassfileParser {
/** Enter own inner classes in the right scope. It needs the scopes to be set up,
* and implicitly current class' superclasses.
*/
- private def enterOwnInnerClasses {
+ private def enterOwnInnerClasses() {
def className(name: Name): Name = {
name.subName(name.lastPos('.') + 1, name.length)
}
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
index bd03fa3f8d..8ae305cc25 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -226,7 +226,7 @@ abstract class ICodeReader extends ClassfileParser {
val codeLength = in.nextInt
val code = new LinearCode
- def parseInstruction {
+ def parseInstruction() {
import opcodes._
import code._
var size = 1 // instruction size
@@ -739,7 +739,7 @@ abstract class ICodeReader extends ClassfileParser {
method.code
}
- def resolveDups {
+ def resolveDups() {
import opcodes._
val tfa = new analysis.MethodTFA() {
@@ -922,7 +922,7 @@ abstract class ICodeReader extends ClassfileParser {
}
/** Recover def-use chains for NEW and initializers. */
- def resolveNEWs {
+ def resolveNEWs() {
import opcodes._
val rdef = new reachingDefinitions.ReachingDefinitionsAnalysis
@@ -957,7 +957,7 @@ abstract class ICodeReader extends ClassfileParser {
def getLocal(idx: Int, kind: TypeKind): Local = {
assert(idx < maxLocals, "Index too large for local variable.");
- def checkValidIndex {
+ def checkValidIndex() {
locals.get(idx - 1) match {
case Some(others) if others exists (_._2.isWideType) =>
global.globalError("Illegal index: " + idx + " points in the middle of another local")
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
index 5f9c2b544a..65ad711845 100644
--- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
+++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
@@ -532,7 +532,7 @@ abstract class ExplicitOuter extends InfoTransform
class Phase(prev: scala.tools.nsc.Phase) extends super.Phase(prev) {
override val checkable = false
- override def run {
+ override def run() {
super.run
Pattern.clear() // clear the cache
}
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
index 2b5a6ae769..e837af42fd 100644
--- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
+++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
@@ -184,7 +184,7 @@ abstract class LambdaLift extends InfoTransform {
* value/variable/let that are free in some function or class, and to
* all class/function symbols that are owned by some function.
*/
- private def computeFreeVars {
+ private def computeFreeVars() {
freeVarTraverser.traverse(unit.body)
do {
diff --git a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
index 8e977b32e5..1710e8e4c3 100644
--- a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
+++ b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
@@ -174,7 +174,7 @@ abstract class OverridingPairs {
def hasNext: Boolean = curEntry ne null
@tailrec
- final def next {
+ final def next() {
if (curEntry ne null) {
overriding = curEntry.sym
if (nextEntry ne null) {
diff --git a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
index e8c8def012..1635a9a534 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
@@ -80,7 +80,7 @@ trait Analyzer extends AnyRef
// Lacking a better fix, we clear it here (before the phase is created, meaning for each
// compiler run). This is good enough for the resident compiler, which was the most affected.
undoLog.clear()
- override def run {
+ override def run() {
val start = startTimer(typerNanos)
global.echoPhaseSummary(this)
currentRun.units foreach applyPhase
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 7567cf6483..96d81d63a8 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -495,7 +495,7 @@ trait Contexts { self: Analyzer =>
private var implicitsCache: List[List[ImplicitInfo]] = null
private var implicitsRunId = NoRunId
- def resetCache : Unit = {
+ def resetCache() {
implicitsRunId = NoRunId
implicitsCache = null
if (outer != null && outer != this) outer.resetCache
diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
index 286310cad0..4a966f1fca 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
@@ -39,7 +39,7 @@ abstract class Duplicators extends Analyzer {
override def newTyper(context: Context): Typer =
new BodyDuplicator(context)
- private def resetClassOwners {
+ private def resetClassOwners() {
oldClassOwner = null
newClassOwner = null
}
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index f1f8257fff..b0cfa6a559 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -347,7 +347,7 @@ trait Namers { self: Analyzer =>
def enterSym(tree: Tree): Context = {
def finishWith(tparams: List[TypeDef]) { enterSymFinishWith(tree, tparams) }
- def finish = finishWith(Nil)
+ def finish() = finishWith(Nil)
def sym = tree.symbol
if (sym != NoSymbol) {
if (forInteractive && sym != null && sym.owner.isTerm) {
diff --git a/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala b/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
index 271999da9a..75483f777c 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
@@ -122,7 +122,7 @@ abstract class TreeCheckers extends Analyzer {
def assertFn(cond: Boolean, msg: => Any) =
if (!cond) errorFn(msg)
- def checkTrees {
+ def checkTrees() {
if (settings.verbose.value)
Console.println("[consistency check at the beginning of phase " + phase + "]")
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala
index 962062eb2d..40c3316e09 100644
--- a/src/compiler/scala/tools/nsc/util/ClassPath.scala
+++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala
@@ -414,11 +414,11 @@ extends ClassPath[T] {
})
}
- def show {
+ def show() {
println("ClassPath %s has %d entries and results in:\n".format(name, entries.size))
asClasspathString split ':' foreach (x => println(" " + x))
}
- def showDuplicates =
+ def showDuplicates() =
ClassPath findDuplicates this foreach {
case (name, xs) => println(xs.mkString(name + ":\n ", "\n ", "\n"))
}
diff --git a/src/compiler/scala/tools/nsc/util/JavaCharArrayReader.scala b/src/compiler/scala/tools/nsc/util/JavaCharArrayReader.scala
index 5051ea6759..f27d25d1b0 100644
--- a/src/compiler/scala/tools/nsc/util/JavaCharArrayReader.scala
+++ b/src/compiler/scala/tools/nsc/util/JavaCharArrayReader.scala
@@ -110,7 +110,7 @@ class JavaCharArrayReader(buf: IndexedSeq[Char], start: Int, /* startline: int,
ch
}
- def rewind {
+ def rewind() {
if (oldBp == -1) throw new IllegalArgumentException
bp = oldBp
ch = oldCh
diff --git a/src/compiler/scala/tools/util/Which.scala b/src/compiler/scala/tools/util/Which.scala
index cf52455259..1cafe156b5 100644
--- a/src/compiler/scala/tools/util/Which.scala
+++ b/src/compiler/scala/tools/util/Which.scala
@@ -11,8 +11,7 @@ import scala.tools.nsc._
/** A tool for identifying which classfile is being used.
* under the given conditions.
*/
-object Which
-{
+object Which {
def main(args: Array[String]): Unit = {
val settings = new Settings()
val names = settings.processArguments(args.toList, true)._2
@@ -22,7 +21,7 @@ object Which
import cp._
for (name <- names) {
- def fail = println("Could not find: %s".format(name))
+ def fail() = println("Could not find: %s".format(name))
(cp findClass name) match {
case Some(classRep) => classRep.binary match {
case Some(f) => println("%s is %s".format(name, f))
diff --git a/src/dbc/scala/dbc/Database.scala b/src/dbc/scala/dbc/Database.scala
index 2895f2cb29..60e16367e8 100644
--- a/src/dbc/scala/dbc/Database.scala
+++ b/src/dbc/scala/dbc/Database.scala
@@ -87,7 +87,7 @@ import java.sql._
/** ..
*/
- def close {
+ def close() {
closing = true
for (conn <- availableConnections) conn.close()
}
@@ -134,7 +134,7 @@ import java.sql._
new scala.dbc.result.Status[Unit] {
val statement = statusStatement;
if (debug) Console.println("## " + statement.sqlString);
- def result = ();
+ def result = ()
private val connection = getConnection;
val jdbcStatement: java.sql.Statement = connection.createStatement();
jdbcStatement.execute(statement.sqlString);
diff --git a/src/detach/library/scala/runtime/RemoteRef.scala b/src/detach/library/scala/runtime/RemoteRef.scala
index 9b692fb415..d8444e5220 100644
--- a/src/detach/library/scala/runtime/RemoteRef.scala
+++ b/src/detach/library/scala/runtime/RemoteRef.scala
@@ -169,7 +169,7 @@ object RemoteRef { /*extends Thread {
private def warning(msg: String) { Debug.warning("[RemoteRef] "+msg) }
private def error(msg: String) { Debug.error("[RemoteRef] "+msg) }
- private def printDebugInfos {
+ private def printDebugInfos() {
def property(name: String): String =
name+"="+(
try { System.getProperty(name, "") }
diff --git a/src/detach/plugin/scala/tools/detach/Detach.scala b/src/detach/plugin/scala/tools/detach/Detach.scala
index 3ce8ef2fff..45342c96cf 100644
--- a/src/detach/plugin/scala/tools/detach/Detach.scala
+++ b/src/detach/plugin/scala/tools/detach/Detach.scala
@@ -756,7 +756,7 @@ abstract class Detach extends PluginComponent
proxy
}
- def addAccessors {
+ def addAccessors() {
def mkGetter(sym: Symbol, name: String): Symbol = {
val getter = if (sym.isMethod) {
val meth = sym.cloneSymbol(proxyIntf)
@@ -1131,8 +1131,8 @@ abstract class Detach extends PluginComponent
if (newDefs.isEmpty) stats1 else stats1 ::: newDefs
}
- private def genProxies {
- def printDebugInfo {
+ private def genProxies() {
+ def printDebugInfo() {
println("\ncompilation unit : "+unit)
for ((sym, _) <- detachedClosure) {
println("closure to detach: "+sym+" (owner: "+sym.owner+")")
@@ -1155,7 +1155,7 @@ abstract class Detach extends PluginComponent
println("\t"+sym+" -> "+xs.mkString(", ")+" ["+xs.length+"]")
}
}
- def printDebugInfo2 {
+ def printDebugInfo2() {
println("\nproxy classes :")
for (sym <- proxies.keysIterator)
println("\t"+sym+"("+sym.tpe+") -> "+proxies(sym))
diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala
index 7a4a9bb18a..ab44585902 100644
--- a/src/library/scala/collection/immutable/Vector.scala
+++ b/src/library/scala/collection/immutable/Vector.scala
@@ -704,7 +704,7 @@ final class VectorBuilder[A]() extends Builder[A,Vector[A]] with VectorPointer[A
s
}
- def clear: Unit = {
+ def clear(): Unit = {
display0 = new Array[AnyRef](32)
depth = 1
blockIndex = 0
diff --git a/src/library/scala/collection/mutable/ArrayStack.scala b/src/library/scala/collection/mutable/ArrayStack.scala
index 2323830b7b..012105d7c4 100644
--- a/src/library/scala/collection/mutable/ArrayStack.scala
+++ b/src/library/scala/collection/mutable/ArrayStack.scala
@@ -143,7 +143,7 @@ extends Seq[T]
def dup() = push(top)
/** Empties the stack. */
- def clear {
+ def clear() {
index = 0
table = new Array(1)
}
diff --git a/src/library/scala/collection/mutable/FlatHashTable.scala b/src/library/scala/collection/mutable/FlatHashTable.scala
index d78c466f69..f2e42f2ca1 100644
--- a/src/library/scala/collection/mutable/FlatHashTable.scala
+++ b/src/library/scala/collection/mutable/FlatHashTable.scala
@@ -241,7 +241,7 @@ trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] {
}
// discards the previous sizemap and populates the new one
- protected def sizeMapInitAndRebuild {
+ protected def sizeMapInitAndRebuild() {
// first allocate
sizeMapInit(table.length)
@@ -263,7 +263,7 @@ trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] {
}
}
- private[collection] def printSizeMap {
+ private[collection] def printSizeMap() {
println(sizemap.toList)
}
diff --git a/src/library/scala/collection/mutable/HashTable.scala b/src/library/scala/collection/mutable/HashTable.scala
index dea1ec7d44..0f6fde0260 100644
--- a/src/library/scala/collection/mutable/HashTable.scala
+++ b/src/library/scala/collection/mutable/HashTable.scala
@@ -265,7 +265,7 @@ trait HashTable[A, Entry >: Null <: HashEntry[A, Entry]] extends HashTable.HashU
}
// discards the previous sizemap and populates the new one
- protected def sizeMapInitAndRebuild {
+ protected def sizeMapInitAndRebuild() {
sizeMapInit(table.length)
// go through the buckets, count elements
@@ -291,7 +291,7 @@ trait HashTable[A, Entry >: Null <: HashEntry[A, Entry]] extends HashTable.HashU
}
}
- private[collection] def printSizeMap {
+ private[collection] def printSizeMap() {
println(sizemap.toList)
}
diff --git a/src/library/scala/collection/mutable/ObservableBuffer.scala b/src/library/scala/collection/mutable/ObservableBuffer.scala
index aa9bd7ac95..c38bf5fbf3 100644
--- a/src/library/scala/collection/mutable/ObservableBuffer.scala
+++ b/src/library/scala/collection/mutable/ObservableBuffer.scala
@@ -46,7 +46,7 @@ trait ObservableBuffer[A] extends Buffer[A] with Publisher[Message[A] with Undoa
val oldelement = apply(n)
super.update(n, newelement)
publish(new Update(Index(n), newelement) with Undoable {
- def undo { update(n, oldelement) }
+ def undo() { update(n, oldelement) }
})
}
@@ -54,7 +54,7 @@ trait ObservableBuffer[A] extends Buffer[A] with Publisher[Message[A] with Undoa
val oldelement = apply(n)
super.remove(n)
publish(new Remove(Index(n), oldelement) with Undoable {
- def undo { insert(n, oldelement) }
+ def undo() { insert(n, oldelement) }
})
oldelement
}
@@ -62,7 +62,7 @@ trait ObservableBuffer[A] extends Buffer[A] with Publisher[Message[A] with Undoa
abstract override def clear(): Unit = {
super.clear
publish(new Reset with Undoable {
- def undo { throw new UnsupportedOperationException("cannot undo") }
+ def undo() { throw new UnsupportedOperationException("cannot undo") }
})
}
}
diff --git a/src/library/scala/collection/mutable/ObservableMap.scala b/src/library/scala/collection/mutable/ObservableMap.scala
index 00087f8f61..ceb23d25c3 100644
--- a/src/library/scala/collection/mutable/ObservableMap.scala
+++ b/src/library/scala/collection/mutable/ObservableMap.scala
@@ -62,7 +62,7 @@ trait ObservableMap[A, B] extends Map[A, B] with Publisher[Message[(A, B)] with
abstract override def clear(): Unit = {
super.clear
publish(new Reset with Undoable {
- def undo: Unit = throw new UnsupportedOperationException("cannot undo")
+ def undo(): Unit = throw new UnsupportedOperationException("cannot undo")
})
}
}
diff --git a/src/library/scala/collection/mutable/ObservableSet.scala b/src/library/scala/collection/mutable/ObservableSet.scala
index 6bb1e45cec..1b375802a5 100644
--- a/src/library/scala/collection/mutable/ObservableSet.scala
+++ b/src/library/scala/collection/mutable/ObservableSet.scala
@@ -46,7 +46,7 @@ trait ObservableSet[A] extends Set[A] with Publisher[Message[A] with Undoable]
abstract override def clear(): Unit = {
super.clear
publish(new Reset with Undoable {
- def undo: Unit = throw new UnsupportedOperationException("cannot undo")
+ def undo(): Unit = throw new UnsupportedOperationException("cannot undo")
})
}
}
diff --git a/src/library/scala/collection/mutable/OpenHashMap.scala b/src/library/scala/collection/mutable/OpenHashMap.scala
index f558f68159..72e729f370 100644
--- a/src/library/scala/collection/mutable/OpenHashMap.scala
+++ b/src/library/scala/collection/mutable/OpenHashMap.scala
@@ -80,7 +80,7 @@ extends Map[Key, Value]
h ^ (h >>> 7) ^ (h >>> 4);
}
- private[this] def growTable = {
+ private[this] def growTable() = {
val oldSize = mask + 1;
val newSize = 4 * oldSize;
val oldTable = table;
@@ -179,7 +179,7 @@ extends Map[Key, Value]
var index = 0;
val initialModCount = modCount;
- private[this] def advance {
+ private[this] def advance() {
if (initialModCount != modCount) sys.error("Concurrent modification");
while((index <= mask) && (table(index) == null || table(index).value == None)) index+=1;
}
diff --git a/src/library/scala/collection/mutable/PriorityQueue.scala b/src/library/scala/collection/mutable/PriorityQueue.scala
index 2c03f329a7..31113797dd 100644
--- a/src/library/scala/collection/mutable/PriorityQueue.scala
+++ b/src/library/scala/collection/mutable/PriorityQueue.scala
@@ -253,7 +253,7 @@ class PriorityQueue[A](implicit val ord: Ordering[A])
*/
override def clone(): PriorityQueue[A] = new PriorityQueue[A] ++= this.iterator
- // def printstate {
+ // def printstate() {
// println("-----------------------")
// println("Size: " + resarr.p_size0)
// println("Internal array: " + resarr.p_array.toList)
diff --git a/src/library/scala/collection/mutable/RevertibleHistory.scala b/src/library/scala/collection/mutable/RevertibleHistory.scala
index 2c51f70b8b..922824ddf0 100644
--- a/src/library/scala/collection/mutable/RevertibleHistory.scala
+++ b/src/library/scala/collection/mutable/RevertibleHistory.scala
@@ -28,7 +28,7 @@ class RevertibleHistory[Evt <: Undoable, Pub] extends History[Evt, Pub] with Und
/** Rollback the full history.
*/
- def undo: Unit = {
+ def undo(): Unit = {
val old = log.toList.reverse
clear
old.foreach { case (sub, event) => event.undo }
diff --git a/src/library/scala/collection/parallel/ParIterableLike.scala b/src/library/scala/collection/parallel/ParIterableLike.scala
index b32ea108f4..7c176eeee4 100644
--- a/src/library/scala/collection/parallel/ParIterableLike.scala
+++ b/src/library/scala/collection/parallel/ParIterableLike.scala
@@ -842,11 +842,11 @@ self: ParIterableLike[T, Repr, Sequential] =>
extends NonDivisibleTask[R, Composite[FR, SR, R, First, Second]] {
def combineResults(fr: FR, sr: SR): R
@volatile var result: R = null.asInstanceOf[R]
- private[parallel] override def signalAbort {
+ private[parallel] override def signalAbort() {
ft.signalAbort
st.signalAbort
}
- protected def mergeSubtasks {
+ protected def mergeSubtasks() {
ft mergeThrowables st
if (throwable eq null) result = combineResults(ft.result, st.result)
}
@@ -883,7 +883,7 @@ self: ParIterableLike[T, Repr, Sequential] =>
def leaf(prevr: Option[R1]) = {
result = map(executeAndWaitResult(inner))
}
- private[parallel] override def signalAbort {
+ private[parallel] override def signalAbort() {
inner.signalAbort
}
override def requiresStrictSplitters = inner.requiresStrictSplitters
@@ -1395,7 +1395,7 @@ self: ParIterableLike[T, Repr, Sequential] =>
}
import collection.DebugUtils._
- private[parallel] def printDebugBuffer = println(buildString {
+ private[parallel] def printDebugBuffer() = println(buildString {
append =>
for (s <- debugBuffer) {
append(s)
diff --git a/src/library/scala/collection/parallel/Tasks.scala b/src/library/scala/collection/parallel/Tasks.scala
index 497e0c638a..873291fb2d 100644
--- a/src/library/scala/collection/parallel/Tasks.scala
+++ b/src/library/scala/collection/parallel/Tasks.scala
@@ -57,7 +57,7 @@ trait Tasks {
// exception handling mechanism
@volatile var throwable: Throwable = null
- def forwardThrowable = if (throwable != null) throw throwable
+ def forwardThrowable() = if (throwable != null) throw throwable
// tries to do the leaf computation, storing the possible exception
private[parallel] def tryLeaf(lastres: Option[R]) {
@@ -101,7 +101,7 @@ trait Tasks {
}
// override in concrete task implementations to signal abort to other tasks
- private[parallel] def signalAbort {}
+ private[parallel] def signalAbort() {}
}
trait TaskImpl[R, +Tp] {
@@ -110,11 +110,11 @@ trait Tasks {
def split: Seq[TaskImpl[R, Tp]]
/** Code that gets called after the task gets started - it may spawn other tasks instead of calling `leaf`. */
- def compute
+ def compute()
/** Start task. */
- def start
+ def start()
/** Wait for task to finish. */
- def sync
+ def sync()
/** Try to cancel the task.
* @return `true` if cancellation is successful.
*/
@@ -126,7 +126,7 @@ trait Tasks {
*
* This method may be overridden.
*/
- def release {}
+ def release() {}
}
protected def newTaskImpl[R, Tp](b: Task[R, Tp]): TaskImpl[R, Tp]
@@ -161,9 +161,9 @@ trait AdaptiveWorkStealingTasks extends Tasks {
def split: Seq[TaskImpl[R, Tp]]
- def compute = if (body.shouldSplitFurther) internal else body.tryLeaf(None)
+ def compute() = if (body.shouldSplitFurther) internal else body.tryLeaf(None)
- def internal = {
+ def internal() = {
var last = spawnSubtasks()
last.body.tryLeaf(None)
@@ -231,7 +231,7 @@ trait ThreadPoolTasks extends Tasks {
@volatile var owned = false
@volatile var completed = false
- def start = synchronized {
+ def start() = synchronized {
// debuglog("Starting " + body)
// utb: future = executor.submit(this)
executor.synchronized {
@@ -239,7 +239,7 @@ trait ThreadPoolTasks extends Tasks {
executor.submit(this)
}
}
- def sync = synchronized {
+ def sync() = synchronized {
// debuglog("Syncing on " + body)
// utb: future.get()
executor.synchronized {
@@ -293,11 +293,11 @@ trait ThreadPoolTasks extends Tasks {
def queue = executor.getQueue.asInstanceOf[LinkedBlockingQueue[Runnable]]
@volatile var totaltasks = 0
- private def incrTasks = synchronized {
+ private def incrTasks() = synchronized {
totaltasks += 1
}
- private def decrTasks = synchronized {
+ private def decrTasks() = synchronized {
totaltasks -= 1
}
@@ -361,12 +361,12 @@ trait FutureThreadPoolTasks extends Tasks {
trait TaskImpl[R, +Tp] extends Runnable with super.TaskImpl[R, Tp] {
@volatile var future: Future[_] = null
- def start = {
+ def start() = {
executor.synchronized {
future = executor.submit(this)
}
}
- def sync = future.get
+ def sync() = future.get
def tryCancel = false
def run = {
compute
@@ -435,8 +435,8 @@ trait HavingForkJoinPool {
trait ForkJoinTasks extends Tasks with HavingForkJoinPool {
trait TaskImpl[R, +Tp] extends RecursiveAction with super.TaskImpl[R, Tp] {
- def start = fork
- def sync = join
+ def start() = fork
+ def sync() = join
def tryCancel = tryUnfork
}
diff --git a/src/library/scala/collection/parallel/immutable/ParHashMap.scala b/src/library/scala/collection/parallel/immutable/ParHashMap.scala
index b9b7cbd69d..85084a945f 100644
--- a/src/library/scala/collection/parallel/immutable/ParHashMap.scala
+++ b/src/library/scala/collection/parallel/immutable/ParHashMap.scala
@@ -115,7 +115,7 @@ self =>
override def toString = "HashTrieIterator(" + sz + ")"
}
- private[parallel] def printDebugInfo {
+ private[parallel] def printDebugInfo() {
println("Parallel hash trie")
println("Top level inner trie type: " + trie.getClass)
trie match {
diff --git a/src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala b/src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala
index a4dc9b4a14..dc583fb4e7 100644
--- a/src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala
+++ b/src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala
@@ -56,7 +56,7 @@ extends Combiner[T, ParArray[T]] {
new ParArray(arrayseq)
}
- def clear {
+ def clear() {
buff.clear
}
diff --git a/src/library/scala/compat/Platform.scala b/src/library/scala/compat/Platform.scala
index b1c6c69145..8ee356e95f 100644
--- a/src/library/scala/compat/Platform.scala
+++ b/src/library/scala/compat/Platform.scala
@@ -67,7 +67,7 @@ object Platform {
def currentTime: Long = System.currentTimeMillis()
@inline
- def collectGarbage: Unit = System.gc()
+ def collectGarbage(): Unit = System.gc()
/** The name of the default character set encoding as a string */
@inline
diff --git a/src/library/scala/concurrent/Lock.scala b/src/library/scala/concurrent/Lock.scala
index 5494ff8c68..08c9f6cd63 100644
--- a/src/library/scala/concurrent/Lock.scala
+++ b/src/library/scala/concurrent/Lock.scala
@@ -18,12 +18,12 @@ package scala.concurrent
class Lock {
var available = true
- def acquire = synchronized {
+ def acquire() = synchronized {
while (!available) wait()
available = false
}
- def release = synchronized {
+ def release() = synchronized {
available = true
notify()
}
diff --git a/src/library/scala/concurrent/pilib.scala b/src/library/scala/concurrent/pilib.scala
index cad8aecf86..7a3758b9c6 100644
--- a/src/library/scala/concurrent/pilib.scala
+++ b/src/library/scala/concurrent/pilib.scala
@@ -43,13 +43,13 @@ object pilib {
abstract class Spawn {
def <(p: => Unit): Spawn
def |(p: => Unit): Spawn
- def > : Unit
+ def > (): Unit
}
val spawn = new Spawn {
//object spawn extends Spawn { // BUG !
def <(p: => Unit): Spawn = { scala.concurrent.ops.spawn(p); this }
def |(p: => Unit): Spawn = { scala.concurrent.ops.spawn(p); this }
- def > : Unit = ()
+ def > (): Unit = ()
}
/////////////////////////// GUARDED PROCESSES //////////////////////////
diff --git a/src/library/scala/reflect/ScalaBeanInfo.scala b/src/library/scala/reflect/ScalaBeanInfo.scala
index 6b026907f4..bcb76c38bc 100644
--- a/src/library/scala/reflect/ScalaBeanInfo.scala
+++ b/src/library/scala/reflect/ScalaBeanInfo.scala
@@ -34,7 +34,7 @@ abstract class ScalaBeanInfo(clazz: java.lang.Class[_],
// override def getAdditionalBeanInfo() = Array(Introspector getBeanInfo clazz.getSuperclass)
- private def init {
+ private def init() {
var i = 0;
while (i < props.length) {
pd(i/3) = new PropertyDescriptor(props(i), clazz, props(i+1), props(i+2))
diff --git a/src/library/scala/sys/process/ProcessImpl.scala b/src/library/scala/sys/process/ProcessImpl.scala
index 857c1af15e..b7549eeb06 100644
--- a/src/library/scala/sys/process/ProcessImpl.scala
+++ b/src/library/scala/sys/process/ProcessImpl.scala
@@ -28,7 +28,7 @@ private[process] trait ProcessImpl {
private[process] object Future {
def apply[T](f: => T): () => T = {
val result = new SyncVar[Either[Throwable, T]]
- def run: Unit =
+ def run(): Unit =
try result set Right(f)
catch { case e: Exception => result set Left(e) }
diff --git a/src/library/scala/testing/Benchmark.scala b/src/library/scala/testing/Benchmark.scala
index 34f769be11..c6ab992306 100644
--- a/src/library/scala/testing/Benchmark.scala
+++ b/src/library/scala/testing/Benchmark.scala
@@ -75,7 +75,7 @@ trait Benchmark {
* should not be measured. This method is run before each call to the
* benchmark payload, 'run'.
*/
- def setUp {
+ def setUp() {
}
/** Perform cleanup operations after each 'run'. For micro benchmarks,
@@ -84,7 +84,7 @@ trait Benchmark {
* write the results to a file. The execution time of this method is not
* measured.
*/
- def tearDown {
+ def tearDown() {
}
/** a string that is written at the beginning of the output line
diff --git a/src/library/scala/util/control/Breaks.scala b/src/library/scala/util/control/Breaks.scala
index 139fcc0bd6..c436df9f8f 100644
--- a/src/library/scala/util/control/Breaks.scala
+++ b/src/library/scala/util/control/Breaks.scala
@@ -57,7 +57,7 @@ class Breaks {
* @note this might be different than the statically closest enclosing
* block!
*/
- def break { throw breakException }
+ def break() { throw breakException }
}
/** An object that can be used for the break control abstraction.
diff --git a/src/library/scala/util/parsing/ast/Binders.scala b/src/library/scala/util/parsing/ast/Binders.scala
index 494cb04166..a4f457e1bf 100644
--- a/src/library/scala/util/parsing/ast/Binders.scala
+++ b/src/library/scala/util/parsing/ast/Binders.scala
@@ -172,8 +172,8 @@ trait Binders extends AbstractSyntax with Mappable {
* the binding in the returned scope also does, and thus the check that all variables are bound is deferred until this scope is left **/
def nested: Scope[binderType] = this // TODO
- def onEnter {}
- def onLeft {}
+ def onEnter() {}
+ def onLeft() {}
}
diff --git a/src/library/scala/xml/dtd/ContentModelParser.scala b/src/library/scala/xml/dtd/ContentModelParser.scala
index 90255e966a..2d87bc0764 100644
--- a/src/library/scala/xml/dtd/ContentModelParser.scala
+++ b/src/library/scala/xml/dtd/ContentModelParser.scala
@@ -73,7 +73,7 @@ object ContentModelParser extends Scanner { // a bit too permissive concerning #
sys.error("unexpected token:" + token2string(token) );
}
// sopt ::= S?
- def sOpt = if( token == S ) nextToken;
+ def sOpt() = if( token == S ) nextToken;
// (' S? mixed ::= '#PCDATA' S? ')'
// | '#PCDATA' (S? '|' S? atom)* S? ')*'
diff --git a/src/library/scala/xml/dtd/Scanner.scala b/src/library/scala/xml/dtd/Scanner.scala
index 20c0204e51..82a8d1af2f 100644
--- a/src/library/scala/xml/dtd/Scanner.scala
+++ b/src/library/scala/xml/dtd/Scanner.scala
@@ -33,7 +33,7 @@ class Scanner extends Tokens with parsing.TokenTests {
}
/** scans the next token */
- final def nextToken {
+ final def nextToken() {
if (token != END) token = readToken
}
@@ -41,7 +41,7 @@ class Scanner extends Tokens with parsing.TokenTests {
final def isIdentChar = ( ('a' <= c && c <= 'z')
|| ('A' <= c && c <= 'Z'));
- final def next = if (it.hasNext) c = it.next else c = ENDCH
+ final def next() = if (it.hasNext) c = it.next else c = ENDCH
final def acc(d: Char) {
if (c == d) next else sys.error("expected '"+d+"' found '"+c+"' !");
diff --git a/src/library/scala/xml/parsing/MarkupParserCommon.scala b/src/library/scala/xml/parsing/MarkupParserCommon.scala
index d2174c2879..d9729e14e1 100644
--- a/src/library/scala/xml/parsing/MarkupParserCommon.scala
+++ b/src/library/scala/xml/parsing/MarkupParserCommon.scala
@@ -201,13 +201,13 @@ private[scala] trait MarkupParserCommon extends TokenTests {
def xToken(that: Seq[Char]) { that foreach xToken }
/** scan [S] '=' [S]*/
- def xEQ = { xSpaceOpt; xToken('='); xSpaceOpt }
+ def xEQ() = { xSpaceOpt; xToken('='); xSpaceOpt }
/** skip optional space S? */
- def xSpaceOpt = while (isSpace(ch) && !eof) nextch
+ def xSpaceOpt() = while (isSpace(ch) && !eof) nextch
/** scan [3] S ::= (#x20 | #x9 | #xD | #xA)+ */
- def xSpace =
+ def xSpace() =
if (isSpace(ch)) { nextch; xSpaceOpt }
else xHandleError(ch, "whitespace expected")
diff --git a/src/library/scala/xml/persistent/CachedFileStorage.scala b/src/library/scala/xml/persistent/CachedFileStorage.scala
index 7f5b6b6310..1f355e29f1 100644
--- a/src/library/scala/xml/persistent/CachedFileStorage.scala
+++ b/src/library/scala/xml/persistent/CachedFileStorage.scala
@@ -33,7 +33,7 @@ extends java.lang.Thread with scala.util.logging.Logged {
*/
private var theFile: File = null
- private def switch = { theFile = if (theFile == file1) file2 else file1; }
+ private def switch() = { theFile = if (theFile == file1) file2 else file1; }
/** this storage modified since last modification check */
protected var dirty = false
@@ -82,7 +82,7 @@ extends java.lang.Thread with scala.util.logging.Logged {
}
/** saves the XML to file */
- private def save = if (this.dirty) {
+ private def save() = if (this.dirty) {
log("[save]\ndeleting "+theFile);
theFile.delete();
log("creating new "+theFile);
@@ -115,7 +115,7 @@ extends java.lang.Thread with scala.util.logging.Logged {
}
/** forces writing of contents to the file, even if there has not been any update. */
- def flush = {
+ def flush() = {
this.dirty = true;
save
}
diff --git a/src/library/scala/xml/pull/XMLEventReader.scala b/src/library/scala/xml/pull/XMLEventReader.scala
index 3902967626..2ffceab1b0 100755
--- a/src/library/scala/xml/pull/XMLEventReader.scala
+++ b/src/library/scala/xml/pull/XMLEventReader.scala
@@ -49,7 +49,7 @@ class XMLEventReader(src: Source) extends ProducerConsumerIterator[XMLEvent] {
// fails for whatever reason the iterator correctness is not impacted,
// only performance (because it will finish the entire XML document,
// or at least as much as it can fit in the queue.)
- def stop = {
+ def stop() = {
produce(POISON)
parserThread.interrupt()
}
diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
index e2afc5644f..3957192f70 100644
--- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
+++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
@@ -52,7 +52,7 @@ class ConsoleRunner extends DirectRunner {
def denotesTestSet(arg: String) = testSetArgs contains arg
- private def printVersion { NestUI outline (versionMsg + "\n") }
+ private def printVersion() { NestUI outline (versionMsg + "\n") }
private val unaryArgs = List(
"--pack", "--all", "--verbose", "--show-diff", "--show-log",
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index 301fe5e32b..bfa6427d21 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -57,7 +57,7 @@ class ScalaCheckFileManager(val origmanager: FileManager) extends FileManager {
}
object Output {
- def init {
+ def init() {
System.setOut(outRedirect)
System.setErr(errRedirect)
}
diff --git a/src/partest/scala/tools/partest/package.scala b/src/partest/scala/tools/partest/package.scala
index 5bcc66ddbd..fe33064f19 100644
--- a/src/partest/scala/tools/partest/package.scala
+++ b/src/partest/scala/tools/partest/package.scala
@@ -39,7 +39,7 @@ package object partest {
System.getProperties.toList.sorted map { case (k, v) => "%s -> %s\n".format(k, v) } mkString
}
- def showAllJVMInfo {
+ def showAllJVMInfo() {
NestUI.verbose(vmArgString)
NestUI.verbose(allPropertiesString)
}
diff --git a/src/scalacheck/org/scalacheck/Prop.scala b/src/scalacheck/org/scalacheck/Prop.scala
index 68e4b89660..199a668914 100644
--- a/src/scalacheck/org/scalacheck/Prop.scala
+++ b/src/scalacheck/org/scalacheck/Prop.scala
@@ -39,7 +39,7 @@ trait Prop {
/** Convenience method that checks this property and reports the
* result on the console. If you need to get the results from the test use
* the <code>check</code> methods in <code>Test</code> instead. */
- def check: Unit = check(Test.Params())
+ def check(): Unit = check(Test.Params())
/** Convenience method that makes it possible to use a this property
* as an application that checks itself on execution */
diff --git a/src/scalacheck/org/scalacheck/Properties.scala b/src/scalacheck/org/scalacheck/Properties.scala
index bb2fe77c47..7fceb4bd35 100644
--- a/src/scalacheck/org/scalacheck/Properties.scala
+++ b/src/scalacheck/org/scalacheck/Properties.scala
@@ -51,7 +51,7 @@ class Properties(val name: String) extends Prop {
/** Convenience method that checks the properties and reports the
* result on the console. If you need to get the results from the test use
* the <code>check</code> methods in <code>Test</code> instead. */
- override def check: Unit = check(Test.Params())
+ override def check(): Unit = check(Test.Params())
/** Convenience method that makes it possible to use a this instance
* as an application that checks itself on execution */
diff --git a/src/scalap/scala/tools/scalap/CodeWriter.scala b/src/scalap/scala/tools/scalap/CodeWriter.scala
index db9b3d570b..d895ce3836 100644
--- a/src/scalap/scala/tools/scalap/CodeWriter.scala
+++ b/src/scalap/scala/tools/scalap/CodeWriter.scala
@@ -73,7 +73,7 @@ class CodeWriter(writer: Writer) {
this
}
- def * : Unit = {}
+ def *() = {}
def println: CodeWriter = newline
diff --git a/src/scalap/scala/tools/scalap/JavaWriter.scala b/src/scalap/scala/tools/scalap/JavaWriter.scala
index 9dd867a1b4..db9d6c5ed9 100644
--- a/src/scalap/scala/tools/scalap/JavaWriter.scala
+++ b/src/scalap/scala/tools/scalap/JavaWriter.scala
@@ -172,7 +172,7 @@ class JavaWriter(classfile: Classfile, writer: Writer) extends CodeWriter(writer
}
}
- def printClassHeader {
+ def printClassHeader() {
if (isInterface(cf.flags)) {
print("trait " + getSimpleClassName(cf.classname))
} else {
@@ -185,7 +185,7 @@ class JavaWriter(classfile: Classfile, writer: Writer) extends CodeWriter(writer
}
}
- def printClass {
+ def printClass() {
val pck = getPackage(cf.classname);
if (pck.length() > 0)
println("package " + pck + ";")
diff --git a/src/scalap/scala/tools/scalap/MetaParser.scala b/src/scalap/scala/tools/scalap/MetaParser.scala
index ac76a94b9c..ca9bd93f86 100644
--- a/src/scalap/scala/tools/scalap/MetaParser.scala
+++ b/src/scalap/scala/tools/scalap/MetaParser.scala
@@ -27,7 +27,7 @@ class MetaParser(meta: String) {
token
}
- protected def parseType: Unit = {
+ protected def parseType(): Unit = {
if (token startsWith "?")
res.append(token.substring(1))
else
diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
index 93c1c7a394..df78bad25e 100644
--- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
+++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
@@ -239,7 +239,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) {
}
def printMethod(level: Int, m: MethodSymbol, indent: () => Unit) {
- def cont = print(" = { /* compiled code */ }")
+ def cont() = print(" = { /* compiled code */ }")
val n = m.name
if (underCaseClass(m) && n == CONSTRUCTOR_NAME) return
diff --git a/src/swing/scala/swing/Component.scala b/src/swing/scala/swing/Component.scala
index fc4936cfde..5eaff35bb0 100644
--- a/src/swing/scala/swing/Component.scala
+++ b/src/swing/scala/swing/Component.scala
@@ -200,7 +200,7 @@ abstract class Component extends UIElement {
def requestFocusInWindow() = peer.requestFocusInWindow()
def hasFocus: Boolean = peer.isFocusOwner
- protected override def onFirstSubscribe {
+ protected override def onFirstSubscribe() {
super.onFirstSubscribe
// TODO: deprecated, remove after 2.8
peer.addComponentListener(new java.awt.event.ComponentListener {
diff --git a/src/swing/scala/swing/Container.scala b/src/swing/scala/swing/Container.scala
index 562d91243c..b39bfe0f5d 100644
--- a/src/swing/scala/swing/Container.scala
+++ b/src/swing/scala/swing/Container.scala
@@ -25,7 +25,7 @@ object Container {
def contents: Seq[Component] = _contents
protected class Content extends BufferWrapper[Component] {
- override def clear { peer.removeAll() }
+ override def clear() { peer.removeAll() }
override def remove(n: Int): Component = {
val c = peer.getComponent(n)
peer.remove(n)
diff --git a/src/swing/scala/swing/MainFrame.scala b/src/swing/scala/swing/MainFrame.scala
index 299f7b9293..e8b276e7fe 100644
--- a/src/swing/scala/swing/MainFrame.scala
+++ b/src/swing/scala/swing/MainFrame.scala
@@ -17,5 +17,5 @@ import event._
* framework and quits the application when closed.
*/
class MainFrame extends Frame {
- override def closeOperation { sys.exit(0) }
+ override def closeOperation() { sys.exit(0) }
}
diff --git a/src/swing/scala/swing/Publisher.scala b/src/swing/scala/swing/Publisher.scala
index ebab00463a..3c3e99fc49 100644
--- a/src/swing/scala/swing/Publisher.scala
+++ b/src/swing/scala/swing/Publisher.scala
@@ -111,7 +111,7 @@ private[swing] trait SingleRefCollection[+A <: AnyRef] extends Iterable[A] { sel
private val elems = self.underlying.iterator
private var hd: A = _
private var ahead: Boolean = false
- private def skip: Unit =
+ private def skip(): Unit =
while (!ahead && elems.hasNext) {
// make sure we have a reference to the next element,
// otherwise it might be garbage collected
diff --git a/src/swing/scala/swing/TextField.scala b/src/swing/scala/swing/TextField.scala
index f04e122fb9..789a8f49a5 100644
--- a/src/swing/scala/swing/TextField.scala
+++ b/src/swing/scala/swing/TextField.scala
@@ -47,7 +47,7 @@ class TextField(text0: String, columns0: Int) extends TextComponent with TextCom
publish(EditDone(TextField.this))
}
- protected override def onFirstSubscribe {
+ protected override def onFirstSubscribe() {
super.onFirstSubscribe
peer.addActionListener(actionListener)
peer.addFocusListener(new FocusAdapter {
@@ -55,7 +55,7 @@ class TextField(text0: String, columns0: Int) extends TextComponent with TextCom
})
}
- protected override def onLastUnsubscribe {
+ protected override def onLastUnsubscribe() {
super.onLastUnsubscribe
peer.removeActionListener(actionListener)
}
diff --git a/src/swing/scala/swing/UIElement.scala b/src/swing/scala/swing/UIElement.scala
index 8e34b0c38c..38bc6308fd 100644
--- a/src/swing/scala/swing/UIElement.scala
+++ b/src/swing/scala/swing/UIElement.scala
@@ -119,7 +119,7 @@ trait UIElement extends Proxy with LazyPublisher {
def ignoreRepaint: Boolean = peer.getIgnoreRepaint
def ignoreRepaint_=(b: Boolean) { peer.setIgnoreRepaint(b) }
- protected def onFirstSubscribe {
+ protected def onFirstSubscribe() {
peer.addComponentListener(new java.awt.event.ComponentListener {
def componentHidden(e: java.awt.event.ComponentEvent) {
publish(UIElementHidden(UIElement.this))
@@ -135,5 +135,5 @@ trait UIElement extends Proxy with LazyPublisher {
}
})
}
- protected def onLastUnsubscribe {}
+ protected def onLastUnsubscribe() {}
}
diff --git a/test/files/buildmanager/t3054/foo/Foo.scala b/test/files/buildmanager/t3054/foo/Foo.scala
index c4838b9958..c0fcd97390 100644
--- a/test/files/buildmanager/t3054/foo/Foo.scala
+++ b/test/files/buildmanager/t3054/foo/Foo.scala
@@ -1,5 +1,5 @@
package foo
class Foo {
- def foo = println("foo")
+ def foo() = println("foo")
}
diff --git a/test/files/buildmanager/t4215/A.scala b/test/files/buildmanager/t4215/A.scala
index fbddd93afc..9db40b0fee 100644
--- a/test/files/buildmanager/t4215/A.scala
+++ b/test/files/buildmanager/t4215/A.scala
@@ -1,5 +1,5 @@
class A {
- def B {
+ def B() {
object C
}
}
diff --git a/test/files/continuations-neg/lazy.check b/test/files/continuations-neg/lazy.check
index bfa44c59a4..b8c6887409 100644
--- a/test/files/continuations-neg/lazy.check
+++ b/test/files/continuations-neg/lazy.check
@@ -1,6 +1,6 @@
lazy.scala:5: error: type mismatch;
found : Unit @scala.util.continuations.cpsParam[Unit,Unit]
required: Unit
- def foo = {
- ^
+ def foo() = {
+ ^
one error found
diff --git a/test/files/continuations-neg/lazy.scala b/test/files/continuations-neg/lazy.scala
index dffc57ffa0..3c8169dd46 100644
--- a/test/files/continuations-neg/lazy.scala
+++ b/test/files/continuations-neg/lazy.scala
@@ -2,14 +2,14 @@ import scala.util.continuations._
object Test {
- def foo = {
+ def foo() = {
lazy val x = shift((k:Unit=>Unit)=>k())
println(x)
}
def main(args: Array[String]) {
reset {
- foo
+ foo()
}
}
diff --git a/test/files/neg/accesses.check b/test/files/neg/accesses.check
index 94fcd615bc..db58af12ce 100644
--- a/test/files/neg/accesses.check
+++ b/test/files/neg/accesses.check
@@ -1,17 +1,17 @@
-accesses.scala:23: error: overriding method f2 in class A of type => Unit;
+accesses.scala:23: error: overriding method f2 in class A of type ()Unit;
method f2 has weaker access privileges; it should not be private
- private def f2: Unit = ()
+ private def f2(): Unit = ()
^
-accesses.scala:24: error: overriding method f3 in class A of type => Unit;
+accesses.scala:24: error: overriding method f3 in class A of type ()Unit;
method f3 has weaker access privileges; it should be at least protected
- private[p2] def f3: Unit = ()
+ private[p2] def f3(): Unit = ()
^
-accesses.scala:25: error: overriding method f4 in class A of type => Unit;
+accesses.scala:25: error: overriding method f4 in class A of type ()Unit;
method f4 has weaker access privileges; it should be at least private[p1]
- private[p2] def f4: Unit
+ private[p2] def f4(): Unit
^
-accesses.scala:26: error: overriding method f5 in class A of type => Unit;
+accesses.scala:26: error: overriding method f5 in class A of type ()Unit;
method f5 has weaker access privileges; it should be at least protected[p1]
- protected[p2] def f5: Unit
+ protected[p2] def f5(): Unit
^
four errors found
diff --git a/test/files/neg/accesses.scala b/test/files/neg/accesses.scala
index 2a6b45c35b..b1df6c0e6c 100644
--- a/test/files/neg/accesses.scala
+++ b/test/files/neg/accesses.scala
@@ -1,27 +1,27 @@
package test.p1.p2
abstract class A {
- private[p2] def f2: Unit
- protected def f3: Unit
- private[p1] def f4: Unit
- protected[p1] def f5: Unit
+ private[p2] def f2(): Unit
+ protected def f3(): Unit
+ private[p1] def f4(): Unit
+ protected[p1] def f5(): Unit
}
abstract class OK1 extends A {
- private[p1] def f2: Unit
- protected[p2] def f3: Unit
- private[test] def f4: Unit
- protected[test] def f5: Unit
+ private[p1] def f2(): Unit
+ protected[p2] def f3(): Unit
+ private[test] def f4(): Unit
+ protected[test] def f5(): Unit
}
abstract class OK2 extends A {
- protected[p1] def f2: Unit
- def f3: Unit
- protected[p1] def f4: Unit
- def f5: Unit
+ protected[p1] def f2(): Unit
+ def f3(): Unit
+ protected[p1] def f4(): Unit
+ def f5(): Unit
}
abstract class Err1 extends A {
- private def f2: Unit = ()
- private[p2] def f3: Unit = ()
- private[p2] def f4: Unit
- protected[p2] def f5: Unit
+ private def f2(): Unit = ()
+ private[p2] def f3(): Unit = ()
+ private[p2] def f4(): Unit
+ protected[p2] def f5(): Unit
}
diff --git a/test/files/neg/bug1960.check b/test/files/neg/bug1960.check
index 6615d90036..8e19f31ef5 100644
--- a/test/files/neg/bug1960.check
+++ b/test/files/neg/bug1960.check
@@ -1,4 +1,4 @@
bug1960.scala:5: error: parameter 'p' requires field but conflicts with p in 'TBase'
-class Aclass (p: Int) extends TBase { def g{ f(p) } }
+class Aclass (p: Int) extends TBase { def g() { f(p) } }
^
one error found
diff --git a/test/files/neg/bug1960.scala b/test/files/neg/bug1960.scala
index af7f270356..5311940b5a 100644
--- a/test/files/neg/bug1960.scala
+++ b/test/files/neg/bug1960.scala
@@ -2,4 +2,4 @@ object ClassFormatErrorExample extends App { new Aclass(1) }
trait TBase { var p:Int = 0; def f(p1: Int) {} }
-class Aclass (p: Int) extends TBase { def g{ f(p) } }
+class Aclass (p: Int) extends TBase { def g() { f(p) } }
diff --git a/test/files/neg/bug630.scala b/test/files/neg/bug630.scala
index d236b51ffd..8a073963b0 100644
--- a/test/files/neg/bug630.scala
+++ b/test/files/neg/bug630.scala
@@ -1,7 +1,7 @@
trait Req1
trait Req2 {
- def test = Console.println("Test")
+ def test() = Console.println("Test")
}
trait Foo {
@@ -10,7 +10,7 @@ trait Foo {
trait Bar {
val foo : Req2
- def test = foo.test
+ def test() = foo.test
}
object Test
diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala
index b172df8740..4a66649a18 100644
--- a/test/files/neg/patmatexhaust.scala
+++ b/test/files/neg/patmatexhaust.scala
@@ -56,12 +56,12 @@ class TestSealedExhaustive { // compile only
case Ga =>
}
- def ma6 = List(1,2) match { // give up
+ def ma6() = List(1,2) match { // give up
case List(1,2) =>
case x :: xs =>
}
- def ma7 = List(1,2) match { //exhaustive
+ def ma7() = List(1,2) match { //exhaustive
case 1::2::Nil =>
case _ =>
}
@@ -87,7 +87,7 @@ class TestSealedExhaustive { // compile only
case C2 | C6 => true
}
- def redundant = 1 match { // include this otherwise script won't test this in files/neg
+ def redundant() = 1 match { // include this otherwise script won't test this in files/neg
case 1 =>
case 1 =>
}
diff --git a/test/files/neg/t2910.check b/test/files/neg/t2910.check
index afff73ec08..ff190122d6 100644
--- a/test/files/neg/t2910.check
+++ b/test/files/neg/t2910.check
@@ -13,4 +13,4 @@ t2910.scala:30: error: forward reference extends over definition of value x
t2910.scala:34: error: forward reference extends over definition of variable x
lazy val f: Int = g
^
-5 errors found \ No newline at end of file
+5 errors found
diff --git a/test/files/neg/t2910.scala b/test/files/neg/t2910.scala
index 1c7ba54971..b772ee4d43 100644
--- a/test/files/neg/t2910.scala
+++ b/test/files/neg/t2910.scala
@@ -5,13 +5,13 @@ object Junk {
ret
}
- def test2 {
+ def test2() {
println(s.length)
val z = 0
lazy val s = "abc"
}
- def test4 {
+ def test4() {
lazy val x = {
x
val z = 0
diff --git a/test/files/neg/tailrec.scala b/test/files/neg/tailrec.scala
index a77f439cfe..e0ebde9863 100644
--- a/test/files/neg/tailrec.scala
+++ b/test/files/neg/tailrec.scala
@@ -10,7 +10,7 @@ object Winners {
@tailrec def loopsucc1(x: Int): Int = loopsucc1(x - 1)
@tailrec def loopsucc2[T](x: Int): Int = loopsucc2[T](x - 1)
- def ding {
+ def ding() {
object dong {
@tailrec def loopsucc3(x: Int): Int = loopsucc3(x)
}
diff --git a/test/files/res/bug722/Parser.scala b/test/files/res/bug722/Parser.scala
index 6d9739ed04..7f84cb2b63 100644
--- a/test/files/res/bug722/Parser.scala
+++ b/test/files/res/bug722/Parser.scala
@@ -2,7 +2,7 @@
package bug722;
trait Parser {
trait Link {
- def foo = {}
+ def foo() = {}
}
}
diff --git a/test/files/res/bug722/ScanBased.scala b/test/files/res/bug722/ScanBased.scala
index fcb853f96d..4793a04914 100644
--- a/test/files/res/bug722/ScanBased.scala
+++ b/test/files/res/bug722/ScanBased.scala
@@ -1,10 +1,10 @@
package bug722;
trait ScanBased extends Parser {
trait AdjacentLink extends Link {
- override def foo = super.foo;
+ override def foo() = super.foo;
}
trait WhitespaceLink extends AdjacentLink {
- override def foo = super.foo;
+ override def foo() = super.foo;
}
}
diff --git a/test/files/res/bug785/ScalaNewTyper.scala b/test/files/res/bug785/ScalaNewTyper.scala
index fb955572ed..d55d60a8d0 100644
--- a/test/files/res/bug785/ScalaNewTyper.scala
+++ b/test/files/res/bug785/ScalaNewTyper.scala
@@ -2,7 +2,7 @@ package bug785;
trait ScalaNewTyper {
private var typed : String = null;
trait HasSymbol {
- protected def foo : Unit = {}
+ protected def foo() : Unit = {}
}
trait HasArgsTypeParametersImpl extends HasSymbol {
private var argss : List[List[String]] = Nil;