ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 46387] New: Ant's javac task cannot compile what plain Sun SDK javac can
Date Fri, 12 Dec 2008 14:53:34 GMT

           Summary: Ant's javac task cannot compile what plain Sun SDK javac
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks

To reproduce, use the following source file in source folder "src":

package ch.arrenbrecht.eclipsequirks.inference;

import java.util.ArrayList;
import java.util.List;

public class New

        public static <T, E extends T> List<T> arrayList( E... _elts )
                final List<T> c = new ArrayList<T>( _elts.length );
                for (E e : _elts)
                        c.add( e );
                return c;

        public static <T, E extends T> List<T> list( E... _elts )
                return arrayList( _elts );


and the following Ant build.xml:

<project name="EclipseQuirks" default="build">

        <target name="build">
                <javac srcdir="src" destdir="temp/classes">
name="ch/arrenbrecht/eclipsequirks/inference/**" />


Running `ant build` will yield:

Buildfile: build.xml

    [javac] Compiling 3 source files to /.../temp/classes
    [javac] /.../src/ch/arrenbrecht/eclipsequirks/covariant/ types
ch.arrenbrecht.eclipsequirks.covariant.ITwo and
ch.arrenbrecht.eclipsequirks.covariant.IOne are incompatible; both define
foo(), but with unrelated return types
    [javac] public interface IBoth extends IOne, ITwo
    [javac]        ^
    [javac] 1 error

/.../build.xml:9: Compile failed; see the compiler error output for details.

Total time: 0 seconds

But a similar compilation using plain javac succeeds:

$ javac -version
javac 1.6.0_0-internal
$ javac \
        -d temp/classes \
        -classpath temp/classes \
        -sourcepath src \
        -g:none \

It also succeeds if I add all the jars on the classpath reported by `ant -v

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message