remove VariableDescriptor.inType

(approved by Andrey Breslav)
This commit is contained in:
Stepan Koltsov
2011-12-30 18:45:49 +04:00
parent 4b9e4b65b4
commit 6446e83b29
18 changed files with 46 additions and 105 deletions
@@ -229,7 +229,7 @@ public abstract class CodegenContext {
pd.getName() + "$bridge$" + accessors.size()
);
JetType receiverType = pd.getReceiverParameter().exists() ? pd.getReceiverParameter().getType() : null;
myAccessor.setType(pd.getInType(), pd.getOutType(), Collections.<TypeParameterDescriptor>emptyList(), pd.getExpectedThisObject(), receiverType);
myAccessor.setType(pd.getOutType(), Collections.<TypeParameterDescriptor>emptyList(), pd.getExpectedThisObject(), receiverType);
PropertyGetterDescriptor pgd = new PropertyGetterDescriptor(
myAccessor, Collections.<AnnotationDescriptor>emptyList(), myAccessor.getModality(),
@@ -672,9 +672,11 @@ public class JetTypeMapper {
@Nullable
public JvmMethodSignature mapSetterSignature(PropertyDescriptor descriptor, OwnerKind kind) {
JetType inType = descriptor.getInType();
if(inType == null)
if (!descriptor.isVar()) {
return null;
}
JetType outType = descriptor.getOutType();
String name = PropertyCodegen.setterName(descriptor.getName());
ArrayList<Type> params = new ArrayList<Type>();
@@ -694,7 +696,7 @@ public class JetTypeMapper {
}
}
params.add(mapType(inType));
params.add(mapType(outType));
// TODO: proper generic signature
return new JvmMethodSignature(new Method(name, Type.VOID_TYPE, params.toArray(new Type[params.size()])), null, null, null, null);