diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java index cb1ab77b096..857d1471935 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java @@ -3692,7 +3692,7 @@ The "returned" value of try expression with no finally is either the last expres @Override public StackValue visitIsExpression(@NotNull JetIsExpression expression, StackValue receiver) { StackValue match = StackValue.expression(OBJECT_TYPE, expression.getLeftHandSide(), this); - return generateIsCheck(match, expression.getTypeRef(), expression.isNegated()); + return generateIsCheck(match, expression.getTypeReference(), expression.isNegated()); } private StackValue generateExpressionMatch(StackValue expressionToMatch, JetExpression patternExpression) { @@ -3844,7 +3844,7 @@ The "returned" value of try expression with no finally is either the last expres StackValue.Local match = subjectLocal == -1 ? null : StackValue.local(subjectLocal, subjectType); if (condition instanceof JetWhenConditionIsPattern) { JetWhenConditionIsPattern patternCondition = (JetWhenConditionIsPattern) condition; - return generateIsCheck(match, patternCondition.getTypeRef(), patternCondition.isNegated()); + return generateIsCheck(match, patternCondition.getTypeReference(), patternCondition.isNegated()); } else if (condition instanceof JetWhenConditionWithExpression) { JetExpression patternExpression = ((JetWhenConditionWithExpression) condition).getExpression(); diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java index b7107b3984d..f0421bc429d 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java @@ -142,7 +142,7 @@ public class PropertyCodegen { if (declaration == null) return true; // Delegated or extension properties can only be referenced via accessors - if (declaration.hasDelegate() || declaration.getReceiverTypeRef() != null) return true; + if (declaration.hasDelegate() || declaration.getReceiverTypeReference() != null) return true; // Class object properties always should have accessors, because their backing fields are moved/copied to the outer class if (isClassObject(descriptor.getContainingDeclaration())) return true; diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/TypeTransformingVisitor.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/TypeTransformingVisitor.java index 12b9b7ac5a8..22284ac1a14 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/TypeTransformingVisitor.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/kotlinSignature/TypeTransformingVisitor.java @@ -83,7 +83,7 @@ public class TypeTransformingVisitor extends JetVisitor { @Override public JetType visitFunctionType(@NotNull JetFunctionType type, Void data) { - return visitCommonType(type.getReceiverTypeRef() == null + return visitCommonType(type.getReceiverTypeReference() == null ? KotlinBuiltIns.getInstance().getFunction(type.getParameters().size()) : KotlinBuiltIns.getInstance().getExtensionFunction(type.getParameters().size()), type); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/DebugTextUtil.kt b/compiler/frontend/src/org/jetbrains/jet/lang/psi/DebugTextUtil.kt index e3e94366289..e45ac4266ae 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/DebugTextUtil.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/DebugTextUtil.kt @@ -167,9 +167,9 @@ private object DebugTextBuildingVisitor : JetVisitor() { override fun visitFunctionType(functionType: JetFunctionType, data: Unit?): String? { return buildText { - appendInn(functionType.getReceiverTypeRef(), suffix = ".") + appendInn(functionType.getReceiverTypeReference(), suffix = ".") appendInn(functionType.getParameterList()) - appendInn(functionType.getReturnTypeRef(), prefix = " -> ") + appendInn(functionType.getReturnTypeReference(), prefix = " -> ") } } @@ -260,7 +260,7 @@ private object DebugTextBuildingVisitor : JetVisitor() { if (function.hasTypeParameterListBeforeFunctionName()) { appendInn(typeParameterList, suffix = " ") } - appendInn(function.getReceiverTypeRef(), suffix = ".") + appendInn(function.getReceiverTypeReference(), suffix = ".") appendInn(function.getNameAsName()) if (!function.hasTypeParameterListBeforeFunctionName()) { appendInn(typeParameterList) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallableDeclaration.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallableDeclaration.java index b67f0f24492..ba448d2d4b7 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallableDeclaration.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallableDeclaration.java @@ -23,7 +23,7 @@ public interface JetCallableDeclaration extends JetNamedDeclaration, JetTypePara JetParameterList getValueParameterList(); @Nullable - JetTypeReference getReceiverTypeRef(); + JetTypeReference getReceiverTypeReference(); @Nullable JetTypeReference getTypeReference(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionNotStubbed.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionNotStubbed.java index b53d1338bf3..d0f99ef79cd 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionNotStubbed.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionNotStubbed.java @@ -61,7 +61,7 @@ abstract public class JetFunctionNotStubbed extends JetTypeParameterListOwnerNot @Override @Nullable - public JetTypeReference getReceiverTypeRef() { + public JetTypeReference getReceiverTypeReference() { PsiElement child = getFirstChild(); while (child != null) { IElementType tt = child.getNode().getElementType(); @@ -78,13 +78,13 @@ abstract public class JetFunctionNotStubbed extends JetTypeParameterListOwnerNot @Override @Nullable public JetTypeReference getTypeReference() { - return TypeRefHelpersPackage.getTypeRef(this); + return TypeRefHelpersPackage.getTypeReference(this); } @Nullable @Override public JetTypeReference setTypeReference(@Nullable JetTypeReference typeRef) { - return TypeRefHelpersPackage.setTypeRef(this, getValueParameterList(), typeRef); + return TypeRefHelpersPackage.setTypeReference(this, getValueParameterList(), typeRef); } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionType.java index a1ca4dec39f..0f9e45b7e7f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionType.java @@ -45,14 +45,14 @@ public class JetFunctionType extends JetElementImplStub getTypeArgumentsAsTypes() { ArrayList result = Lists.newArrayList(); - JetTypeReference receiverTypeRef = getReceiverTypeRef(); + JetTypeReference receiverTypeRef = getReceiverTypeReference(); if (receiverTypeRef != null) { result.add(receiverTypeRef); } for (JetParameter jetParameter : getParameters()) { result.add(jetParameter.getTypeReference()); } - JetTypeReference returnTypeRef = getReturnTypeRef(); + JetTypeReference returnTypeRef = getReturnTypeReference(); if (returnTypeRef != null) { result.add(returnTypeRef); } @@ -76,7 +76,7 @@ public class JetFunctionType extends JetElementImplStub { @Nullable public JetTypeReference setTypeRef(@Nullable JetTypeReference typeRef) { - return TypeRefHelpersPackage.setTypeRef(this, getNameIdentifier(), typeRef); + return TypeRefHelpersPackage.setTypeReference(this, getNameIdentifier(), typeRef); } public boolean hasDefaultValue() { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetProperty.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetProperty.java index 1d276a0d820..dff6ce46e06 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetProperty.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetProperty.java @@ -86,7 +86,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub()) .firstOrNull() } -fun setTypeRef(declaration: JetNamedDeclaration, addAfter: PsiElement?, typeRef: JetTypeReference?): JetTypeReference? { - val oldTypeRef = getTypeRef(declaration) +fun setTypeReference(declaration: JetNamedDeclaration, addAfter: PsiElement?, typeRef: JetTypeReference?): JetTypeReference? { + val oldTypeRef = getTypeReference(declaration) if (typeRef != null) { if (oldTypeRef != null) { return oldTypeRef.replace(typeRef) as JetTypeReference diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/psiUtil/jetPsiUtil.kt b/compiler/frontend/src/org/jetbrains/jet/lang/psi/psiUtil/jetPsiUtil.kt index 57c7de5a844..f6a04a0b193 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/psiUtil/jetPsiUtil.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/psiUtil/jetPsiUtil.kt @@ -193,7 +193,7 @@ public fun PsiElement.isExtensionDeclaration(): Boolean { else -> null } - return callable?.getReceiverTypeRef() != null + return callable?.getReceiverTypeReference() != null } public fun PsiElement.isObjectLiteral(): Boolean = this is JetObjectDeclaration && isObjectLiteral() diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java index 6bc2d8de522..1a2bf907037 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.lang.psi.stubs.elements; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; import com.intellij.psi.stubs.IndexSink; import com.intellij.psi.stubs.StubElement; import com.intellij.psi.stubs.StubInputStream; @@ -25,7 +23,6 @@ import com.intellij.psi.stubs.StubOutputStream; import com.intellij.util.io.StringRef; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.lang.psi.JetDeclaration; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.psi.JetNamedFunction; import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub; @@ -44,7 +41,7 @@ public class JetFunctionElementType extends JetStubElementType parameterTypes = new ArrayList(); @@ -210,7 +210,7 @@ public class TypeResolver { parameterTypes.add(resolveType(c.noBareTypes(), parameter.getTypeReference())); } - JetTypeReference returnTypeRef = type.getReturnTypeRef(); + JetTypeReference returnTypeRef = type.getReturnTypeReference(); JetType returnType; if (returnTypeRef != null) { returnType = resolveType(c.noBareTypes(), returnTypeRef); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ArgumentTypeResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ArgumentTypeResolver.java index 4c2fbe48446..8eb442490ac 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ArgumentTypeResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ArgumentTypeResolver.java @@ -212,7 +212,7 @@ public class ArgumentTypeResolver { JetFunctionLiteral functionLiteral = expression.getFunctionLiteral(); JetType returnType = resolveTypeRefWithDefault(functionLiteral.getTypeReference(), scope, temporaryTrace, DONT_CARE); assert returnType != null; - JetType receiverType = resolveTypeRefWithDefault(functionLiteral.getReceiverTypeRef(), scope, temporaryTrace, null); + JetType receiverType = resolveTypeRefWithDefault(functionLiteral.getReceiverTypeReference(), scope, temporaryTrace, null); return KotlinBuiltIns.getInstance().getFunctionType(Annotations.EMPTY, receiverType, parameterTypes, returnType); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/extension/InlineAnalyzerExtension.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/extension/InlineAnalyzerExtension.java index 8659597c6d2..201d1e654a0 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/extension/InlineAnalyzerExtension.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/extension/InlineAnalyzerExtension.java @@ -123,7 +123,7 @@ public class InlineAnalyzerExtension implements FunctionAnalyzerExtension.Analyz } ReceiverParameterDescriptor receiverParameter = functionDescriptor.getExtensionReceiverParameter(); if (receiverParameter != null) { - JetTypeReference receiver = function.getReceiverTypeRef(); + JetTypeReference receiver = function.getReceiverTypeReference(); assert receiver != null : "Descriptor has a receiver but psi doesn't " + function.getText(); hasInlinable |= checkInlinableParameter(receiverParameter, receiver, functionDescriptor, trace); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java index b161a8bb87a..bdd7f35f730 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java @@ -130,7 +130,7 @@ public class ClosureExpressionsTypingVisitor extends ExpressionTypingVisitor { boolean functionTypeExpected ) { JetFunctionLiteral functionLiteral = expression.getFunctionLiteral(); - JetTypeReference receiverTypeRef = functionLiteral.getReceiverTypeRef(); + JetTypeReference receiverTypeRef = functionLiteral.getReceiverTypeReference(); AnonymousFunctionDescriptor functionDescriptor = new AnonymousFunctionDescriptor( context.scope.getContainingDeclaration(), Annotations.EMPTY, CallableMemberDescriptor.Kind.DECLARATION, toSourceElement(functionLiteral) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorForStatements.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorForStatements.java index bfe567286d4..b82c13f1555 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorForStatements.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorForStatements.java @@ -97,7 +97,7 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito @Override public JetTypeInfo visitProperty(@NotNull JetProperty property, ExpressionTypingContext typingContext) { ExpressionTypingContext context = typingContext.replaceContextDependency(INDEPENDENT).replaceScope(scope); - JetTypeReference receiverTypeRef = property.getReceiverTypeRef(); + JetTypeReference receiverTypeRef = property.getReceiverTypeReference(); if (receiverTypeRef != null) { context.trace.report(LOCAL_EXTENSION_PROPERTY.on(receiverTypeRef)); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java index 7105ad6628a..13b7be36ffb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java @@ -55,10 +55,10 @@ public class PatternMatchingTypingVisitor extends ExpressionTypingVisitor { JetTypeInfo typeInfo = facade.safeGetTypeInfo(leftHandSide, context.replaceScope(context.scope)); JetType knownType = typeInfo.getType(); DataFlowInfo dataFlowInfo = typeInfo.getDataFlowInfo(); - if (expression.getTypeRef() != null) { + if (expression.getTypeReference() != null) { DataFlowValue dataFlowValue = DataFlowValueFactory.createDataFlowValue(leftHandSide, knownType, context.trace.getBindingContext()); - DataFlowInfo conditionInfo = checkTypeForIs(context, knownType, expression.getTypeRef(), dataFlowValue).thenInfo; + DataFlowInfo conditionInfo = checkTypeForIs(context, knownType, expression.getTypeReference(), dataFlowValue).thenInfo; DataFlowInfo newDataFlowInfo = conditionInfo.and(dataFlowInfo); context.trace.record(BindingContext.DATAFLOW_INFO_AFTER_CONDITION, expression, newDataFlowInfo); } @@ -191,8 +191,8 @@ public class PatternMatchingTypingVisitor extends ExpressionTypingVisitor { if (subjectExpression == null) { context.trace.report(EXPECTED_CONDITION.on(condition)); } - if (condition.getTypeRef() != null) { - DataFlowInfos result = checkTypeForIs(context, subjectType, condition.getTypeRef(), subjectDataFlowValue); + if (condition.getTypeReference() != null) { + DataFlowInfos result = checkTypeForIs(context, subjectType, condition.getTypeReference(), subjectDataFlowValue); if (condition.isNegated()) { newDataFlowInfo.set(new DataFlowInfos(result.elseInfo, result.thenInfo)); } diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/JetIconProvider.java b/idea/idea-analysis/src/org/jetbrains/jet/plugin/JetIconProvider.java index c0ef085397d..9177804b072 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/JetIconProvider.java +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/JetIconProvider.java @@ -107,7 +107,7 @@ public class JetIconProvider extends IconProvider { } if (psiElement instanceof JetNamedFunction) { - if (((JetFunction) psiElement).getReceiverTypeRef() != null) { + if (((JetFunction) psiElement).getReceiverTypeReference() != null) { return JetIcons.EXTENSION_FUNCTION; } diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/SimplifyNegatedBinaryExpressionIntention.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/SimplifyNegatedBinaryExpressionIntention.kt index 08e7f4f9da8..47e39e97d98 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/SimplifyNegatedBinaryExpressionIntention.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/SimplifyNegatedBinaryExpressionIntention.kt @@ -78,7 +78,7 @@ public class SimplifyNegatedBinaryExpressionIntention : JetSelfTargetingIntentio when (expression) { is JetIsExpression -> { psiFactory.createExpression( - "${expression.getLeftHandSide().getText() ?: ""} ${invertedOperation.getValue()} ${expression.getTypeRef()?.getText() ?: ""}" + "${expression.getLeftHandSide().getText() ?: ""} ${invertedOperation.getValue()} ${expression.getTypeReference()?.getText() ?: ""}" ) } is JetBinaryExpression -> psiFactory.createBinaryExpression( diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/MemberMatching.java b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/MemberMatching.java index 97da2cf3a2a..4f2875d875e 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/MemberMatching.java +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/MemberMatching.java @@ -43,10 +43,10 @@ public class MemberMatching { @Nullable private static JetTypeReference getReceiverType(@NotNull JetNamedDeclaration propertyOrFunction) { if (propertyOrFunction instanceof JetNamedFunction) { - return ((JetNamedFunction) propertyOrFunction).getReceiverTypeRef(); + return ((JetNamedFunction) propertyOrFunction).getReceiverTypeReference(); } if (propertyOrFunction instanceof JetProperty) { - return ((JetProperty) propertyOrFunction).getReceiverTypeRef(); + return ((JetProperty) propertyOrFunction).getReceiverTypeReference(); } throw new IllegalArgumentException("Neither function nor declaration: " + propertyOrFunction.getClass().getName()); } @@ -83,7 +83,7 @@ public class MemberMatching { KotlinBuiltIns builtIns = KotlinBuiltIns.getInstance(); int parameterCount = type.getParameters().size(); - if (type.getReceiverTypeRef() == null) { + if (type.getReceiverTypeReference() == null) { return builtIns.getFunction(parameterCount).getName().asString(); } else { diff --git a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java index 4fb61a70c5a..42e318db96e 100644 --- a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java +++ b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java @@ -72,7 +72,7 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { JetTypeParameterList typeParameterList = function.getTypeParameterList(); if (typeParameterList != null) memberSuspects.add(typeParameterList); - JetTypeReference receiverTypeRef = function.getReceiverTypeRef(); + JetTypeReference receiverTypeRef = function.getReceiverTypeReference(); if (receiverTypeRef != null) memberSuspects.add(receiverTypeRef); JetTypeReference returnTypeRef = function.getTypeReference(); @@ -87,7 +87,7 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { JetTypeParameterList typeParameterList = property.getTypeParameterList(); if (typeParameterList != null) memberSuspects.add(typeParameterList); - JetTypeReference receiverTypeRef = property.getReceiverTypeRef(); + JetTypeReference receiverTypeRef = property.getReceiverTypeReference(); if (receiverTypeRef != null) memberSuspects.add(receiverTypeRef); JetTypeReference returnTypeRef = property.getTypeReference(); diff --git a/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.kt b/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.kt index 851ea8c15b9..4e006e7c987 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.kt +++ b/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.kt @@ -216,8 +216,8 @@ public class JetCompletionContributor : CompletionContributor() { if (userType != typeRef.getTypeElement()) return false val parent = typeRef.getParent() return when (parent) { - is JetNamedFunction -> typeRef == parent.getReceiverTypeRef() - is JetProperty -> typeRef == parent.getReceiverTypeRef() + is JetNamedFunction -> typeRef == parent.getReceiverTypeReference() + is JetProperty -> typeRef == parent.getReceiverTypeReference() else -> false } } diff --git a/idea/src/org/jetbrains/jet/plugin/findUsages/JetUsageTypeProvider.kt b/idea/src/org/jetbrains/jet/plugin/findUsages/JetUsageTypeProvider.kt index e3d863407f3..aaa7e0e0f2b 100644 --- a/idea/src/org/jetbrains/jet/plugin/findUsages/JetUsageTypeProvider.kt +++ b/idea/src/org/jetbrains/jet/plugin/findUsages/JetUsageTypeProvider.kt @@ -64,7 +64,7 @@ public object JetUsageTypeProvider : UsageTypeProviderEx { property.getTypeReference().isAncestor(refExpr) -> return if (property.isLocal()) UsageType.CLASS_LOCAL_VAR_DECLARATION else JetUsageTypes.NON_LOCAL_PROPERTY_TYPE - property.getReceiverTypeRef().isAncestor(refExpr) -> + property.getReceiverTypeReference().isAncestor(refExpr) -> return JetUsageTypes.EXTENSION_RECEIVER_TYPE } } @@ -74,7 +74,7 @@ public object JetUsageTypeProvider : UsageTypeProviderEx { when { function.getTypeReference().isAncestor(refExpr) -> return JetUsageTypes.FUNCTION_RETURN_TYPE - function.getReceiverTypeRef().isAncestor(refExpr) -> + function.getReceiverTypeReference().isAncestor(refExpr) -> return JetUsageTypes.EXTENSION_RECEIVER_TYPE } } @@ -97,7 +97,7 @@ public object JetUsageTypeProvider : UsageTypeProviderEx { refExpr.getParentByTypeAndBranch(javaClass()) { getTypeReference() } != null -> JetUsageTypes.VALUE_PARAMETER_TYPE - refExpr.getParentByTypeAndBranch(javaClass()) { getTypeRef() } != null -> + refExpr.getParentByTypeAndBranch(javaClass()) { getTypeReference() } != null -> JetUsageTypes.IS with(refExpr.getParentByTypeAndBranch(javaClass()) { getRight() }) { diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/MakeTypeExplicitInLambdaIntention.kt b/idea/src/org/jetbrains/jet/plugin/intentions/MakeTypeExplicitInLambdaIntention.kt index cee3379895f..e485c5d8fee 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/MakeTypeExplicitInLambdaIntention.kt +++ b/idea/src/org/jetbrains/jet/plugin/intentions/MakeTypeExplicitInLambdaIntention.kt @@ -99,7 +99,7 @@ public class MakeTypeExplicitInLambdaIntention : JetSelfTargetingIntention { val op = if (isNegated()) "!is" else "is" - toBinaryExpression(subject, op, getTypeRef()) + toBinaryExpression(subject, op, getTypeReference()) } is JetWhenConditionInRange -> { toBinaryExpression(subject, getOperationReference()!!.getText()!!, getRangeExpression()) @@ -173,7 +173,7 @@ public fun JetWhenExpression.introduceSubject(): JetWhenExpression { val conditionExpression = ((condition as JetWhenConditionWithExpression)).getExpression() when (conditionExpression) { is JetIsExpression -> { - builder.pattern(conditionExpression.getTypeRef(), conditionExpression.isNegated()) + builder.pattern(conditionExpression.getTypeReference(), conditionExpression.isNegated()) } is JetBinaryExpression -> { val lhs = conditionExpression.getLeft() diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/declarations/ConvertMemberToExtension.java b/idea/src/org/jetbrains/jet/plugin/intentions/declarations/ConvertMemberToExtension.java index 927e5a55409..b4838e1bbf4 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/declarations/ConvertMemberToExtension.java +++ b/idea/src/org/jetbrains/jet/plugin/intentions/declarations/ConvertMemberToExtension.java @@ -73,7 +73,7 @@ public class ConvertMemberToExtension extends BaseIntentionAction { return declaration != null && declaration.getParent() instanceof JetClassBody && declaration.getParent().getParent() instanceof JetClass - && declaration.getReceiverTypeRef() == null; + && declaration.getReceiverTypeReference() == null; } private static JetCallableDeclaration getTarget(Editor editor, PsiFile file) { diff --git a/idea/src/org/jetbrains/jet/plugin/presentation/JetFunctionPresenter.java b/idea/src/org/jetbrains/jet/plugin/presentation/JetFunctionPresenter.java index 2ff6abf60a5..7371a1a8708 100644 --- a/idea/src/org/jetbrains/jet/plugin/presentation/JetFunctionPresenter.java +++ b/idea/src/org/jetbrains/jet/plugin/presentation/JetFunctionPresenter.java @@ -62,7 +62,7 @@ public class JetFunctionPresenter implements ItemPresentationProvider } else if (declaration instanceof JetFunction) { JetFunction function = (JetFunction) declaration; - JetTypeReference receiverTypeRef = function.getReceiverTypeRef(); + JetTypeReference receiverTypeRef = function.getReceiverTypeReference(); if (receiverTypeRef != null) { text = receiverTypeRef.getText() + "." + text; } diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/callableBuilder/CallableBuilder.kt b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/callableBuilder/CallableBuilder.kt index 19dc9bdefca..9b07b9781a4 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/callableBuilder/CallableBuilder.kt +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/callableBuilder/CallableBuilder.kt @@ -372,7 +372,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) { val receiverTypeRef = JetPsiFactory(declaration).createType(receiverTypeCandidate!!.theType.renderLong(typeParameterNameMap)) replaceWithLongerName(receiverTypeRef, receiverTypeCandidate.theType) - val funcReceiverTypeRef = declaration.getReceiverTypeRef() + val funcReceiverTypeRef = declaration.getReceiverTypeReference() if (funcReceiverTypeRef != null) { typeRefsToShorten.add(funcReceiverTypeRef) } diff --git a/idea/src/org/jetbrains/jet/plugin/refactoring/inline/KotlinInlineValHandler.java b/idea/src/org/jetbrains/jet/plugin/refactoring/inline/KotlinInlineValHandler.java index 978f9a99460..72051307a17 100644 --- a/idea/src/org/jetbrains/jet/plugin/refactoring/inline/KotlinInlineValHandler.java +++ b/idea/src/org/jetbrains/jet/plugin/refactoring/inline/KotlinInlineValHandler.java @@ -83,7 +83,7 @@ public class KotlinInlineValHandler extends InlineActionHandler { return false; } JetProperty property = (JetProperty) element; - return !property.isVar() && property.getGetter() == null && property.getReceiverTypeRef() == null; + return !property.isVar() && property.getGetter() == null && property.getReceiverTypeReference() == null; } @Override diff --git a/js/js.translator/src/org/jetbrains/k2js/translate/expression/PatternTranslator.java b/js/js.translator/src/org/jetbrains/k2js/translate/expression/PatternTranslator.java index bc30b6228cf..ee8308af208 100644 --- a/js/js.translator/src/org/jetbrains/k2js/translate/expression/PatternTranslator.java +++ b/js/js.translator/src/org/jetbrains/k2js/translate/expression/PatternTranslator.java @@ -52,7 +52,7 @@ public final class PatternTranslator extends AbstractTranslator { @NotNull public JsExpression translateIsExpression(@NotNull JetIsExpression expression) { JsExpression left = Translation.translateAsExpression(expression.getLeftHandSide(), context()); - JetTypeReference typeReference = expression.getTypeRef(); + JetTypeReference typeReference = expression.getTypeReference(); assert typeReference != null; JsExpression result = translateIsCheck(left, typeReference); if (expression.isNegated()) { diff --git a/js/js.translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java b/js/js.translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java index 3720fdf4518..3ecb6b92088 100644 --- a/js/js.translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java +++ b/js/js.translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java @@ -175,7 +175,7 @@ public final class WhenTranslator extends AbstractTranslator { JsExpression expressionToMatch = getExpressionToMatch(); assert expressionToMatch != null : "An is-check is not allowed in when() without subject."; - JetTypeReference typeReference = conditionIsPattern.getTypeRef(); + JetTypeReference typeReference = conditionIsPattern.getTypeReference(); assert typeReference != null : "An is-check must have a type reference."; return Translation.patternTranslator(context).translateIsCheck(expressionToMatch, typeReference);