Bug 107858 - illegal argument to proceed crashes the parser
Summary: illegal argument to proceed crashes the parser
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 10:53 EDT by Samuel Gélineau CLA
Modified: 2005-08-31 12:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Gélineau CLA 2005-08-24 10:53:45 EDT
in a context where proceed requires zero arguments, calling it with an extra
argument crashes the compiler, but only if that argument is a field access:

class Foo {
  Foo field;
  void test() {}
}

public aspect Bug {
  void around() : call(void Foo.test()) {
    Foo foo = new Foo().field;
    proceed(foo); // caught at compile time
    proceed(new Foo().field); // crashes
  }
}


/home/user/sgelin3/dev/java/ajc/new_bug/Bug.java [error] Internal compiler error
java.lang.NullPointerException
        at
org.aspectj.ajdt.internal.compiler.ast.AccessForInlineVisitor.getAccessibleField(AccessForInlineVisitor.java:145)
        at
org.aspectj.ajdt.internal.compiler.ast.AccessForInlineVisitor.endVisit(AccessForInlineVisitor.java:108)
        at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldReference.traverse(FieldReference.java:609)
        at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:467)
        at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:212)
Comment 1 Adrian Colyer CLA 2005-08-26 11:46:05 EDT
for M4
Comment 2 Adrian Colyer CLA 2005-08-31 10:24:41 EDT
now fixed in tree, will be available in published build from AspectJ download
page later on today.
Comment 3 Adrian Colyer CLA 2005-08-31 12:21:18 EDT
now available in published build