From a058bd9ae17ca3570ca53ff7d0feaaa2daf1102a Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 13 Sep 2005 14:24:48 +0000 Subject: test and fix for pr106554: staticinitialization and PTW --- weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'weaver') diff --git a/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java b/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java index 60f4faf65..f952f1461 100644 --- a/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java +++ b/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java @@ -84,6 +84,12 @@ public class PerTypeWithin extends PerClause { shadow.getSourceLocation(),true,new ISourceLocation[]{getSourceLocation()}); shadow.getIWorld().getMessageHandler().handleMessage(msg); } + + // See pr106554 - we can't put advice calls in an interface when the advice is defined + // in a pertypewithin aspect - the JPs only exist in the static initializer and can't + // call the localAspectOf() method. + if (enclosingType.isInterface()) return FuzzyBoolean.NO; + typePattern.resolve(shadow.getIWorld()); return isWithinType(enclosingType); } -- cgit v1.2.3