Browse Source

tests and fix for pr112027

tags/V1_5_0RC1
aclement 18 years ago
parent
commit
ae612d9752

+ 4
- 0
tests/bugs150/pr112027.aj View File

@@ -0,0 +1,4 @@
public aspect pr112027 {
pointcut pc() : this(pr112027);
before(pr112027 tis) : pc() && this(tis) { }
}

+ 2
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java View File

@@ -50,6 +50,8 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
*/
public void testUnboundFormal_pr112027() { runTest("unexpected error unboundFormalInPC");}
public void testBadDecp_pr110788_1() { runTest("bad generic decp - 1");}
public void testBadDecp_pr110788_2() { runTest("bad generic decp - 2");}
public void testBadDecp_pr110788_3() { runTest("bad generic decp - 3");}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml View File

@@ -5014,6 +5014,10 @@
<compile files="pr102357.aj"/>
<run class="pr102357"/>
</ajc-test>
<ajc-test dir="bugs150" title="unexpected error unboundFormalInPC">
<compile files="pr112027.aj"/>
</ajc-test>

<ajc-test dir="bugs150" title="ITD varargs in constructor">
<compile files="pr111481.aj" options="-1.5"/>

+ 1
- 1
weaver/src/org/aspectj/weaver/patterns/BindingTypePattern.java View File

@@ -48,7 +48,7 @@ public class BindingTypePattern extends ExactTypePattern implements BindingPatte
}
public int hashCode() {
int result = 17;
result = 37*result + type.hashCode();
result = 37*result + super.hashCode();
result = 37*result + formalIndex;
return result;
}

+ 4
- 0
weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java View File

@@ -148,6 +148,7 @@ public class ExactTypePattern extends TypePattern {
public boolean equals(Object other) {
if (!(other instanceof ExactTypePattern)) return false;
if (other instanceof BindingTypePattern) return false;
ExactTypePattern o = (ExactTypePattern)other;
if (includeSubtypes != o.includeSubtypes) return false;
if (isVarArgs != o.isVarArgs) return false;
@@ -158,6 +159,9 @@ public class ExactTypePattern extends TypePattern {
public int hashCode() {
int result = 17;
result = 37*result + type.hashCode();
result = 37*result + new Boolean(includeSubtypes).hashCode();
result = 37*result + new Boolean(isVarArgs).hashCode();
result = 37*result + typeParameters.hashCode();
result = 37*result + annotationPattern.hashCode();
return result;
}

Loading…
Cancel
Save