summaryrefslogtreecommitdiff
path: root/src/dotnet-library
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-07-25 17:10:26 +0000
committermichelou <michelou@epfl.ch>2007-07-25 17:10:26 +0000
commita06edbf12ad26742124d9d445d790b80e25c8538 (patch)
tree4244cdc5881f266400aad62caec26208ef396019 /src/dotnet-library
parenta21a258fe6f9e4e145f7e9929c7a12d74b730439 (diff)
downloadscala-a06edbf12ad26742124d9d445d790b80e25c8538.tar.gz
scala-a06edbf12ad26742124d9d445d790b80e25c8538.tar.bz2
scala-a06edbf12ad26742124d9d445d790b80e25c8538.zip
minor change (msil)
Diffstat (limited to 'src/dotnet-library')
-rw-r--r--src/dotnet-library/scala/Random.scala2
-rw-r--r--src/dotnet-library/scala/compat/Platform.scala10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/dotnet-library/scala/Random.scala b/src/dotnet-library/scala/Random.scala
index 45e3d6619d..2df7cb5eb2 100644
--- a/src/dotnet-library/scala/Random.scala
+++ b/src/dotnet-library/scala/Random.scala
@@ -25,7 +25,7 @@ class Random(self0: System.Random) {
def this(seed: Int) = this(new System.Random(seed))
/** Creates a new random number generator. */
- def this() = this(Math.abs(System.Environment.TickCount))
+ def this() = this(new System.Random(System.Environment.TickCount))
/** Returns the next pseudorandom, uniformly distributed boolean value
* from this random number generator's sequence.
diff --git a/src/dotnet-library/scala/compat/Platform.scala b/src/dotnet-library/scala/compat/Platform.scala
index 8b31b52539..7d5ec48b67 100644
--- a/src/dotnet-library/scala/compat/Platform.scala
+++ b/src/dotnet-library/scala/compat/Platform.scala
@@ -26,7 +26,7 @@ object Platform {
* @param destPos ..
* @param length ..
*/
- def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int): Unit = {
+ def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int) {
if (!src.isInstanceOf[System.Array]) throw new Exception("src for arraycopy is not an Array; use scala.Array.copy for boxed arrays");
if (!dest.isInstanceOf[System.Array]) throw new Exception("dest for arraycopy is not an Array; use scala.Array.copy for boxed arrays");
System.Array.Copy(src.asInstanceOf[System.Array], srcPos, dest.asInstanceOf[System.Array], destPos, length)
@@ -40,9 +40,11 @@ object Platform {
* @return ..
*/
def createArray(elemClass: Class, length: Int): AnyRef =
- System.Array.CreateInstance(elemClass, length);
+ System.Array.CreateInstance(elemClass, length)
- def arrayclear(arr: Array[Int]): Unit = System.Array.Clear(arr.asInstanceOf[System.Array], 0, arr.length)
+ def arrayclear(arr: Array[Int]) {
+ System.Array.Clear(arr.asInstanceOf[System.Array], 0, arr.length)
+ }
def getClassForName(name: String): Class = System.Type.GetType(name)
@@ -50,7 +52,7 @@ object Platform {
def currentTime: Long = 0L
- def collectGarbage: Unit = System.GC.Collect()
+ def collectGarbage { System.GC.Collect() }
}