internal bool AssignmentCompatible(IReflect lhir, bool reportError){
if (lhir == Typeob.Object || lhir == Typeob.Array || lhir is ArrayObject) return true;
IReflect target_element_ir;
if (lhir == Typeob.Array)
target_element_ir = Typeob.Object;
else if (lhir is TypedArray){
TypedArray tArr = ((TypedArray)lhir);
if (tArr.rank != 1){
this.context.HandleError(JSError.TypeMismatch, reportError);
return false;
}
target_element_ir = tArr.elementType;
}else if (lhir is Type && ((Type)lhir).IsArray){
Type t = ((Type)lhir);
if (t.GetArrayRank() != 1){
this.context.HandleError(JSError.TypeMismatch, reportError);
return false;
}
target_element_ir = t.GetElementType();
}else
return false;
for (int i = 0, n = this.elements.count; i < n; i++)
if (!Binding.AssignmentCompatible(target_element_ir, this.elements[i], this.elements[i].InferType(null), reportError))
return false;
return true;
}