(binding.declaration.inferredType != null && binding.declaration.inferredType.isFunction())) {
MethodBinding methodBinding=
- new MethodBinding(0, binding.name, TypeBinding.UNKNOWN, null,this.enclosingTypeBinding());
+ new MethodBinding(0, binding.name, TypeBinding.UNKNOWN, null,this.enclosingTypeBinding(), binding);
methodBinding.createFunctionTypeBinding(this);
addLocalMethod(methodBinding);
if (variable!=null)
{
MethodBinding binding;
- if (!(variable.type.isAnyType() || variable.type.isFunctionType()))
- {
- binding=new ProblemMethodBinding(methodName,null,ProblemReasons.NotAFunction);
- }
- else
+// if (!(variable.type.isAnyType() || variable.type.isFunctionType()))
+// {
+// binding=new ProblemMethodBinding(methodName,null,ProblemReasons.NotAFunction);
+// }
+// else
binding = new MethodBinding(ClassFileConstants.AccPublic,
- methodName,TypeBinding.UNKNOWN,null,variable.declaringScope.enclosingTypeBinding());
+ methodName,TypeBinding.UNKNOWN,null,variable.declaringScope.enclosingTypeBinding(), variable);
addLocalMethod(binding);
return binding;
public FunctionTypeBinding functionTypeBinding;
public ReferenceBinding allocationType;
public Method oaaMethod;
+ public VariableBinding variableBinding;
protected MethodBinding() {
// for creating problem or synthetic method
}
+public MethodBinding(int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] parameters, ReferenceBinding declaringClass, VariableBinding variable) {
+ this.modifiers = modifiers;
+ this.selector = selector;
+ this.returnType = returnType;
+ this.parameters = (parameters == null || parameters.length == 0) ? Binding.NO_PARAMETERS : parameters;
+ this.declaringClass = declaringClass;
+ this.variableBinding = variable;
+
+ // propagate the strictfp & deprecated modifiers
+ if (this.declaringClass != null) {
+ if (this.declaringClass.isStrictfp())
+ if (!(isAbstract()))
+ this.modifiers |= ClassFileConstants.AccStrictfp;
+ }
+}
public MethodBinding(int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] parameters, ReferenceBinding declaringClass) {
this.modifiers = modifiers;
this.selector = selector;
this.returnType = returnType;
this.parameters = (parameters == null || parameters.length == 0) ? Binding.NO_PARAMETERS : parameters;
this.declaringClass = declaringClass;
+ this.variableBinding = null;
// propagate the strictfp & deprecated modifiers
if (this.declaringClass != null) {
this.returnType = initialMethodBinding.returnType;
this.parameters = initialMethodBinding.parameters;
this.declaringClass = declaringClass;
+ this.variableBinding = null;
}
/* Answer true if the argument types & the receiver's parameters are equal
*/