getReturnType() removed from ScriptDescriptor
This commit is contained in:
@@ -116,7 +116,7 @@ public class ScriptCodegen extends MemberCodegen {
|
||||
@NotNull MethodContext context
|
||||
) {
|
||||
|
||||
Type blockType = typeMapper.mapType(scriptDescriptor.getReturnType());
|
||||
Type blockType = typeMapper.mapType(scriptDescriptor.getScriptCodeDescriptor().getReturnType());
|
||||
|
||||
classBuilder.newField(null, ACC_PUBLIC | ACC_FINAL, ScriptDescriptor.LAST_EXPRESSION_VALUE_FIELD_NAME,
|
||||
blockType.getDescriptor(), null, null);
|
||||
|
||||
@@ -280,7 +280,12 @@ public class ReplInterpreter {
|
||||
|
||||
earlierLines.add(new EarlierLine(line, scriptDescriptor, scriptClass, scriptInstance, scriptClassType));
|
||||
|
||||
return LineResult.successful(rv, scriptDescriptor.getReturnType().equals(KotlinBuiltIns.getInstance().getUnitType()));
|
||||
return LineResult.successful(
|
||||
rv,
|
||||
KotlinBuiltIns.getInstance().getUnitType().equals(
|
||||
scriptDescriptor.getScriptCodeDescriptor().getReturnType()
|
||||
)
|
||||
);
|
||||
} catch (Throwable e) {
|
||||
PrintWriter writer = new PrintWriter(System.err);
|
||||
classLoader.dumpClasses(writer);
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.descriptors;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotated;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.ScriptCodeDescriptor;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,9 +27,6 @@ public interface ScriptDescriptor extends Annotated, DeclarationDescriptor, Decl
|
||||
String LAST_EXPRESSION_VALUE_FIELD_NAME = "rv";
|
||||
Name NAME = Name.special("<script>");
|
||||
|
||||
@NotNull
|
||||
JetType getReturnType();
|
||||
|
||||
int getPriority();
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -39,7 +39,6 @@ public class ScriptDescriptorImpl extends DeclarationDescriptorNonRootImpl imple
|
||||
|
||||
private final int priority;
|
||||
|
||||
private JetType returnType;
|
||||
private List<ValueParameterDescriptor> valueParameters;
|
||||
|
||||
private final ScriptCodeDescriptor scriptCodeDescriptor = new ScriptCodeDescriptor(this);
|
||||
@@ -75,7 +74,6 @@ public class ScriptDescriptorImpl extends DeclarationDescriptorNonRootImpl imple
|
||||
@NotNull List<? extends PropertyDescriptorImpl> properties,
|
||||
@NotNull List<? extends FunctionDescriptor> functions
|
||||
) {
|
||||
this.returnType = returnType;
|
||||
scriptCodeDescriptor.initialize(implicitReceiver, valueParameters, returnType);
|
||||
|
||||
PropertyDescriptorImpl propertyDescriptor = PropertyDescriptorImpl.create(classDescriptor,
|
||||
@@ -122,12 +120,6 @@ public class ScriptDescriptorImpl extends DeclarationDescriptorNonRootImpl imple
|
||||
return priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public JetType getReturnType() {
|
||||
return returnType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<ValueParameterDescriptor> getValueParameters() {
|
||||
|
||||
Reference in New Issue
Block a user