View | Details | Raw Unified | Return to bug 254618
Collapse All | Expand All

(-)src/org/aspectj/weaver/ResolvedType.java (+8 lines)
Lines 1604-1609 Link Here
1604
										MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger
1604
										MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger
1605
												.getAspectType().getName(), existingMember), munger.getSourceLocation()));
1605
												.getAspectType().getName(), existingMember), munger.getSourceLocation()));
1606
							}
1606
							}
1607
/*
1608
						} else {
1609
							// report an error?
1610
							getWorld().getMessageHandler().handleMessage(MessageUtil.error("clashing ret types?"
1611
							// WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, munger.getAspectType().getName(),
1612
							// existingMember)
1613
									, munger.getSourceLocation()));
1614
*/
1607
						}
1615
						}
1608
					}
1616
					}
1609
				} else if (isDuplicateMemberWithinTargetType(existingMember, this, sig)) {
1617
				} else if (isDuplicateMemberWithinTargetType(existingMember, this, sig)) {
(-)bugs164/pr254618/Bug2.java (+27 lines)
Added Link Here
1
class Car {
2
	String kind;
3
	Car(String kind) {
4
		this.kind = kind;
5
	}
6
	public String toString() { return "Car:"+kind;}
7
}
8
9
class FastCar extends Car {
10
	FastCar(String kind) {
11
		super(kind);
12
	}
13
	public String toString() { return "FastCar:"+kind;}
14
}
15
16
public class Bug2 {
17
  Car foo() { return new Car("Golf"); }
18
19
  public static void main(String[] argv) {
20
    System.out.println(new Bug2().foo());
21
  }
22
}
23
24
aspect X {
25
  // Should not get put onto Bug2 - it already has a Car related method and this only differs by subtype
26
  public FastCar Bug2.foo() { return new FastCar("MR2");}
27
}
(-)bugs164/pr254618/Bug.java (+11 lines)
Added Link Here
1
public class Bug {
2
  int foo() { return 5; }
3
4
  public static void main(String[] argv) {
5
    System.out.println(new Bug().foo());
6
  }
7
}
8
9
aspect X {
10
  public String Bug.foo() { return "abc";}
11
}

Return to bug 254618