### Eclipse Workspace Patch 1.0 #P org.aspectj.matcher Index: src/org/aspectj/weaver/ResolvedType.java =================================================================== RCS file: /cvsroot/tools/org.aspectj/modules/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java,v retrieving revision 1.10 diff -u -r1.10 ResolvedType.java --- src/org/aspectj/weaver/ResolvedType.java 27 Feb 2009 22:02:57 -0000 1.10 +++ src/org/aspectj/weaver/ResolvedType.java 3 Mar 2009 19:09:10 -0000 @@ -1604,6 +1604,14 @@ MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger .getAspectType().getName(), existingMember), munger.getSourceLocation())); } +/* + } else { + // report an error? + getWorld().getMessageHandler().handleMessage(MessageUtil.error("clashing ret types?" + // WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger.getAspectType().getName(), + // existingMember) + , munger.getSourceLocation())); +*/ } } } else if (isDuplicateMemberWithinTargetType(existingMember, this, sig)) { #P tests Index: bugs164/pr254618/Bug2.java =================================================================== RCS file: bugs164/pr254618/Bug2.java diff -N bugs164/pr254618/Bug2.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bugs164/pr254618/Bug2.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,27 @@ +class Car { + String kind; + Car(String kind) { + this.kind = kind; + } + public String toString() { return "Car:"+kind;} +} + +class FastCar extends Car { + FastCar(String kind) { + super(kind); + } + public String toString() { return "FastCar:"+kind;} +} + +public class Bug2 { + Car foo() { return new Car("Golf"); } + + public static void main(String[] argv) { + System.out.println(new Bug2().foo()); + } +} + +aspect X { + // Should not get put onto Bug2 - it already has a Car related method and this only differs by subtype + public FastCar Bug2.foo() { return new FastCar("MR2");} +} Index: bugs164/pr254618/Bug.java =================================================================== RCS file: bugs164/pr254618/Bug.java diff -N bugs164/pr254618/Bug.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bugs164/pr254618/Bug.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,11 @@ +public class Bug { + int foo() { return 5; } + + public static void main(String[] argv) { + System.out.println(new Bug().foo()); + } +} + +aspect X { + public String Bug.foo() { return "abc";} +}