[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Problem with generic aspects
|
- From: "Andy Clement" <andrew.clement@xxxxxxxxx>
- Date: Sun, 6 Apr 2008 15:27:03 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=GRsq6g+Hz4QlDM0vMjH7aeKlZIFNYzlCheuUqm/bNBk=; b=TwIClgH2i+KTyDwZJF32S9rlBqFVna1OVrtbHh2RnjtQHCjcSm8/wEIPYk6Yb7YPa4doci+w7rC+8/DhgwcpyqPqPbSDEMxcNPEaEQTjlUEdrfTVvfXCu2TgtAUoSvqZt07p5pyLizlaPJIMw5cjxWuyJi4wUlnSu4uZpJ7u8K4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=j9q4sYZ5RBuca/9KQYcqb1QoYIoPYHySkVyxyaksnnUgRIwD54GXGXjS8IW/FE9h3xrNwYk0laRvoSKY4JuuVR4dVBKB80mqMTeIYs4nbwY4JDroUCI8QpYlyaGoXUyTBDMKC/H+EemolHF6QrOuz/lsdDF98qUDoLULgl6J/EM=
A verifyerror is a bug - you should raise an AspectJ bug. If you were
doing something wrong it should be an error message at compile time,
not an error at runtime.
cheers,
Andy.
On 06/04/2008, Ivar Rummelhoff <ivarru@xxxxxxxxx> wrote:
> Hello,
> I do not know if this is a known bug/limitation or I am doing
> something wrong, but I get a runtime exception when I try the
> following example:
>
>
> public abstract aspect GenAsp<T> {
> public abstract T transform(T x);
> T around() : execution(T *(*)) {return transform(proceed());}
> }
> public aspect IntAsp extends GenAsp<Integer> {
> public Integer transform(Integer x) {return x;} // identity transformation
> }
> public class IntAspTest {
> static Integer mylength(String x) {return x.length();}
> public static void main(String[] args) {System.out.println(mylength(""));}
> }
>
>
> The exception I get is:
> java.lang.VerifyError: (class: IntAsp, method: transform signature:
> (Ljava/lang/Integer;)Ljava/lang/Integer;) Wrong return type in
> function
> I believe I am using the latest versions of Java (1.6.0_05) and
> AspectJ (1.6.0m2).
>
> Kind regards,
>
> Ivar Rummelhoff
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>