Yes.

Without -target:jvm.1.4 option it works,

boisv...@sixtine:~/svn/buildr-java$ /opt/boisvert/scala-2.7.5/bin/scalac
/home/boisvert/svn/buildr-java/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala

but with -target:jvm-1.4 option it fails:

boisv...@sixtine:~/svn/buildr-java$ /opt/boisvert/scala-2.7.5/bin/scalac
-target:jvm-1.4
/home/boisvert/svn/buildr-java/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala
/home/boisvert/svn/buildr-java/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala:13:
error: type mismatch;
 found   : java.lang.Class
 required: Class[_]
  @throws(classOf[Throwable])
          ^
/home/boisvert/svn/buildr-java/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala:24:
error: type mismatch;
 found   : java.lang.Class
 required: Class[_]
  @throws(classOf[Throwable])
          ^
two errors found

alex

On Mon, Sep 28, 2009 at 8:54 AM, Daniel Spiewak <[email protected]> wrote:

> It doesn't work?  Have you tried compiling using scalac's -target:jvm-1.4
> option?
>
> Daniel
>
> On Mon, Sep 28, 2009 at 10:47 AM, <[email protected]> wrote:
>
> > Author: boisvert
> > Date: Mon Sep 28 15:47:36 2009
> > New Revision: 819603
> >
> > URL: http://svn.apache.org/viewvc?rev=819603&view=rev
> > Log:
> > Comment out @throws annotation; doesn't work with JVM 1.4 target
> >
> > Modified:
> >
> >
>  buildr/trunk/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala
> >
> > Modified:
> >
> buildr/trunk/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala
> > URL:
> >
> http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala?rev=819603&r1=819602&r2=819603&view=diff
> >
> >
> ==============================================================================
> > ---
> >
> buildr/trunk/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala
> > (original)
> > +++
> >
> buildr/trunk/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala
> > Mon Sep 28 15:47:36 2009
> > @@ -9,7 +9,8 @@
> >  object SpecsSingletonRunner {
> >   type Spec = { def main(args: Array[String]) }
> >
> > -  @throws(classOf[Throwable])
> > +  // Incompatible with JVM 1.4 target
> > +  // @throws(classOf[Throwable])
> >   def main(args: Array[String]) {
> >     val (colors, spec) = if (args.length > 1 && args(1) == "-c")
> >       (true, args(2))
> > @@ -19,7 +20,8 @@
> >     run(args(0), colors, spec)
> >   }
> >
> > -  @throws(classOf[Throwable])
> > +  // Incompatible with JVM 1.4 target
> > +  // @throws(classOf[Throwable])
> >   def run(path: String, colors: Boolean, spec: String) = {
> >     val parent = new File(path)
> >     val specURL = new File(parent, spec.replace('.', '/') +
> ".class").toURL
> >
> >
> >
>

Reply via email to