RE: [abc-dev] Compilation order should matter?

From: Eric Bodden <eric.bodden@mail.mcgill.ca>
Date: Wed Aug 02 2006 - 01:26:27 BST

Hmmm, actually I am not so sure this is a bug. At least ajc should give
you the same behavior up till now:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=52105

What *does* look wrong to me is "-sourceroots s40", because I believe
that this should rather be pointing to the package *root*, i.e. the
directory containing the "s40" folder. But this should not change
anything, I guess.

Eric

> -----Original Message-----
> From: Majordomo list server [mailto:majordomo@comlab.ox.ac.uk] On
> Behalf Of Oege de Moor
> Sent: Tuesday, August 01, 2006 4:54 PM
> To: abc-dev@comlab.ox.ac.uk
> Subject: RE: [abc-dev] Compilation order should matter?
>
> Many thanks for reporting this bug.
>
> It is, in fact, a bug in the Polyglot Java compiler framework.
>
> To verify that, leave out the aspect, put the interface in a separate
> file and write "B implements IConstant" in the declaration of B. It
> doesn't compile with the Polyglot compiler; I believe it might be a
> problem with the implementation of barrier passes in Polyglot.
>
> We (the abc developers) are unlikely to fix this problem soon.
> Is it a showstopper for you?
>
> -Oege
>
> > -----Original Message-----
> > From: Majordomo list server [mailto:majordomo@comlab.ox.ac.uk] On
> > Behalf Of Fernando Calheiros
> > Sent: 01 August 2006 20:40
> > To: abc-dev@comlab.ox.ac.uk
> > Subject: [abc-dev] Compilation order should matter?
> >
> > Hi everyone, I'm using ABC in a research project and the following
> > situation has come up... suppose that I have the following classes
> and
> > aspects (in their respective files).
> >
> > package s40;
> >
> > public class A {
> > public static void main(String[] args) {
> > switch(1) {
> > case B.LITERAL:
> > System.out.println("Works");
> > }
> > }
> > }
> >
> > ---------------------------------------------------------
> >
> > package s40;
> >
> > public class B {
> > }
> >
> > ---------------------------------------------------------
> > package s40;
> >
> > public aspect C {
> > declare parents : B implements IConstant;
> >
> > public interface IConstant {
> > public static final int LITERAL = 1;
> > }
> > }
> >
> > This code should compile, but it doesn't (using "java abc.main.Main
> > -sourceroots s40"), instead it gives me the following error message:
> >
> > A.java:6: Case label must be an integral constant.
> >
> > But if class A was named D (in D.java), this code compiles just
fine.
> >
> > (It compiles with both ways in AspectJ)
> >
> > Is it a compiler bug?
> >
> > Thanks for your time,
> > Fernando Calheiros
>
>
>
Received on Wed Aug 02 01:26:46 2006

This archive was generated by hypermail 2.1.8 : Mon Aug 28 2006 - 10:20:08 BST