summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-07-29 13:47:44 +0000
committermichelou <michelou@epfl.ch>2008-07-29 13:47:44 +0000
commit8b954c346eee3bc5d3f8c80d4f2adf4757d62111 (patch)
treebeea525d5684b6e51bfa3ff388cae023a38fd3ca
parent2513754bd52bc09b9060d1c967548867fda4cc3e (diff)
downloadscala-8b954c346eee3bc5d3f8c80d4f2adf4757d62111.tar.gz
scala-8b954c346eee3bc5d3f8c80d4f2adf4757d62111.tar.bz2
scala-8b954c346eee3bc5d3f8c80d4f2adf4757d62111.zip
removed warning (Random)
-rw-r--r--src/actors/scala/actors/remote/TcpService.scala1
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala4
-rw-r--r--src/library/scala/BigInt.scala9
-rw-r--r--src/library/scala/util/Random.scala2
4 files changed, 9 insertions, 7 deletions
diff --git a/src/actors/scala/actors/remote/TcpService.scala b/src/actors/scala/actors/remote/TcpService.scala
index 1f1dec4369..11af1bbbee 100644
--- a/src/actors/scala/actors/remote/TcpService.scala
+++ b/src/actors/scala/actors/remote/TcpService.scala
@@ -17,6 +17,7 @@ import java.lang.{Thread, SecurityException}
import java.net.{InetAddress, ServerSocket, Socket, UnknownHostException, URLClassLoader}
import scala.collection.mutable.HashMap
+import scala.util.Random
/* Object TcpService.
*
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 d897318f31..9a554b0649 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
@@ -582,10 +582,10 @@ abstract class TypeFlowAnalysis {
def push(t: InferredType) {
depth += 1
- types += t
+ types = types ::: List(t)
}
- def push(k: TypeKind): Unit = push(Const(k))
+ def push(k: TypeKind) { push(Const(k)) }
}
abstract class InferredType {
diff --git a/src/library/scala/BigInt.scala b/src/library/scala/BigInt.scala
index a24d141aec..bab35c14cb 100644
--- a/src/library/scala/BigInt.scala
+++ b/src/library/scala/BigInt.scala
@@ -1,6 +1,6 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** / __/ __// _ | / / / _ | (c) 2006-2008, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
@@ -8,6 +8,7 @@
// $Id$
+
package scala
import java.math.BigInteger
@@ -60,7 +61,7 @@ object BigInt {
/** Constructs a randomly generated positive BigInt that is probably prime,
* with the specified bitLength.
*/
- def apply(bitlength: Int, certaInty: Int, rnd: Random): BigInt =
+ def apply(bitlength: Int, certaInty: Int, rnd: scala.util.Random): BigInt =
new BigInt(new BigInteger(bitlength, certaInty, rnd.self))
/** Constructs a randomly generated BigInt, uniformly distributed over the
@@ -70,7 +71,7 @@ object BigInt {
* @param rnd ...
* @return ...
*/
- def apply(numbits: Int, rnd: Random): BigInt =
+ def apply(numbits: Int, rnd: scala.util.Random): BigInt =
new BigInt(new BigInteger(numbits, rnd.self))
/** Translates the decimal String representation of a BigInt into a BigInt.
@@ -90,7 +91,7 @@ object BigInt {
/** Returns a positive BigInt that is probably prime, with the specified bitLength.
*/
- def probablePrime(bitLength: Int, rnd: Random): BigInt =
+ def probablePrime(bitLength: Int, rnd: scala.util.Random): BigInt =
new BigInt(BigInteger.probablePrime(bitLength, rnd.self))
/** Implicit conversion from <code>int</code> to <code>BigInt</code>.
diff --git a/src/library/scala/util/Random.scala b/src/library/scala/util/Random.scala
index ef6b066bd8..b025b70b5c 100644
--- a/src/library/scala/util/Random.scala
+++ b/src/library/scala/util/Random.scala
@@ -6,7 +6,7 @@
** |/ **
\* */
-// $Id: $
+// $Id$
package scala.util