Browse Source

Add resolution of argument types

Some new code in JDT is using the information in here, so need
to resolve them.
tags/V1_9_0_RC3
Andy Clement 7 years ago
parent
commit
52f101b0e0

+ 7
- 5
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java View 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);
}
}
}

Loading…
Cancel
Save