summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-04-20 11:33:44 +0000
committermichelou <michelou@epfl.ch>2006-04-20 11:33:44 +0000
commitacc947a63b310669bb206f6dacd67cd7d8379fd3 (patch)
treed2cbd511ca8be1f63567a95f45f82c447756e3f3
parent6c633ce6bb8dbe86a36fb17da18912e19bae8e56 (diff)
downloadscala-acc947a63b310669bb206f6dacd67cd7d8379fd3.tar.gz
scala-acc947a63b310669bb206f6dacd67cd7d8379fd3.tar.bz2
scala-acc947a63b310669bb206f6dacd67cd7d8379fd3.zip
updated Ant build file for testing Scala examples
replaced 'compareTo' by 'compare' in file examples/maps.scala
-rw-r--r--build.examples.xml42
-rw-r--r--docs/examples/maps.scala2
2 files changed, 23 insertions, 21 deletions
diff --git a/build.examples.xml b/build.examples.xml
index ef692c58c6..d0059d117e 100644
--- a/build.examples.xml
+++ b/build.examples.xml
@@ -4,8 +4,9 @@
<project name="scala-examples" default="build">
<description>
- I am SABBUS for ${ant.project.name}, the build system for the Scala compiler and core
- library. Please check the 'docs/README' file for more information about me.
+ I am SABBUS for ${ant.project.name}, the build system for the Scala compiler
+ and core library. Please check the 'docs/README' file for more information
+ about me.
</description>
<echo level="info" message="Running SABBUS for ${ant.project.name}..."/>
@@ -28,7 +29,6 @@ PROPERTIES
<!-- Location of pre-compiled libraries properties -->
<property name="scala.lib.jar" value="${lib.dir}/scala-library.jar"/>
<property name="scala.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
- <property name="jaco.jar" value="${lib.dir}/jaco.jar"/>
<property name="fjbg.name" value="fjbg.jar"/>
<property name="fjbg.jar" value="${lib.dir}/${fjbg.name}"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
@@ -55,7 +55,7 @@ INITIALISATION
</tstamp>
<!-- Testing if everything is in place -->
<echo level="verbose" message="scala.lib.jar=${scala.lib.jar}"/>
- <fail message="Scala library in 'lib/' is not available">
+ <fail message="Scala library in '${lib.dir}/' is not available">
<condition><not><and>
<available
classname="scala.Predef"
@@ -72,7 +72,7 @@ INITIALISATION
</and></not></condition>
</fail>
<echo level="verbose" message="scala.comp.jar=${scala.comp.jar}"/>
- <fail message="Scala compiler in 'lib/' is not available">
+ <fail message="Scala compiler in '${lib.dir}/' is not available">
<condition><not>
<available
classname="scala.tools.ant.Scalac"
@@ -81,7 +81,7 @@ INITIALISATION
</not></condition>
</fail>
<echo level="verbose" message="fjbg.jar=${fjbg.jar}"/>
- <fail message="FJBG library in 'lib/' is not available">
+ <fail message="FJBG library in '${lib.dir}/' is not available">
<condition><not>
<available
classname="ch.epfl.lamp.fjbg.JCode"
@@ -89,15 +89,9 @@ INITIALISATION
/>
</not></condition>
</fail>
- <echo level="verbose" message="jaco.jar=${jaco.jar}"/>
- <fail message="JaCo compiler in 'lib/' is not available">
- <condition><not>
- <available classname="jaco.pizza.Main" classpath="${jaco.jar}"/>
- </not></condition>
- </fail>
<echo level="verbose" message="ant.jar=${ant.jar}"/>
<echo level="verbose" message="ant-contrib.jar=${ant-contrib.jar}"/>
- <fail message="Additional Ant tasks in 'lib/' is not available">
+ <fail message="Additional Ant tasks in '${lib.dir}/' is not available">
<condition><not>
<available
classname="net.sf.antcontrib.AntContribVersion"
@@ -179,9 +173,11 @@ INITIALISATION
<target name="setup" depends="init">
<!-- Creating boot-level tasks -->
- <taskdef name="scalac"
- classname="scala.tools.ant.Scalac"
- classpathref="scala.classpath"/>
+ <taskdef
+ name="scalac"
+ classname="scala.tools.ant.Scalac"
+ classpathref="scala.classpath"
+ />
<property name="init.avail" value="yes"/>
</target>
@@ -194,8 +190,11 @@ BUILD
<echo level="verbose">src.dir=${src.dir}</echo>
<pathconvert property="list" pathsep=",">
<path>
- <fileset dir="${src.dir}" includes="examples/*.scala"
- excludes="${excludes.compile}"/>
+ <fileset
+ dir="${src.dir}"
+ includes="examples/*.scala"
+ excludes="${excludes.compile}"
+ />
</path>
<mapper>
<globmapper from="${src.dir}/*" to="*"/>
@@ -222,8 +221,11 @@ RUN
<target name="run" depends="build">
<pathconvert property="list" pathsep=",">
<path>
- <fileset dir="${src.dir}" includes="examples/*.scala"
- excludes="${excludes.run}"/>
+ <fileset
+ dir="${src.dir}"
+ includes="examples/*.scala"
+ excludes="${excludes.run}"
+ />
</path>
<mapper>
<globmapper from="${src.dir}/*" to="*"/>
diff --git a/docs/examples/maps.scala b/docs/examples/maps.scala
index 8b5158005b..1b5d41df54 100644
--- a/docs/examples/maps.scala
+++ b/docs/examples/maps.scala
@@ -157,7 +157,7 @@ object maps {
def month = m
def day = d
- def compareTo[b >: Date <% Ordered[b]](that: b): int = that match {
+ override def compare [b >: Date <% Ordered[b]](that: b): Int = that match {
case other: Date =>
if ((year == other.year) &&
(month == other.month) &&