]> source.dussan.org Git - aspectj.git/commitdiff
Add resolution of argument types
authorAndy Clement <aclement@pivotal.io>
Tue, 9 May 2017 00:25:45 +0000 (17:25 -0700)
committerAndy Clement <aclement@pivotal.io>
Tue, 9 May 2017 00:25:45 +0000 (17:25 -0700)
Some new code in JDT is using the information in here, so need
to resolve them.

org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java

index 364bbe3774cc672e70a040e0fe94e077d38b0acc..bd8e4db35f54b49fc7d8557308d34d770059df1c 100644 (file)
@@ -157,13 +157,15 @@ public class Proceed extends MessageSend {
 
 
        //      checkInvocationArguments(scope, this.receiver, this.actualReceiverType, this.binding, this.arguments, argumentTypes, argsContainCast, this);
-               for (int i=0, len=arguments.length; i < len; i++) {
+               int len = arguments.length;
+               this.argumentTypes = (len == 0? TypeBinding.NO_TYPES:new TypeBinding[len]);
+               for (int i=0; i < len; i++) {
                        Expression arg = arguments[i];
-                       TypeBinding argType = arg.resolveType(scope);
-                       if (argType != null) {
+                       argumentTypes[i] = arg.resolveType(scope);
+                       if (argumentTypes[i] != null) {
                                TypeBinding paramType = binding.parameters[i];
-                               if (!argType.isCompatibleWith(paramType)) {
-                                       scope.problemReporter().typeMismatchError(argType, paramType, arg,null);
+                               if (!argumentTypes[i].isCompatibleWith(paramType)) {
+                                       scope.problemReporter().typeMismatchError(argumentTypes[i], paramType, arg, null);
                                }
                        }
                }