Removed JetTupleType.
This commit is contained in:
-5
@@ -87,11 +87,6 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
: KotlinBuiltIns.getInstance().getExtensionFunction(type.getParameters().size()), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetType visitTupleType(JetTupleType type, Void data) {
|
||||
return visitCommonType(KotlinBuiltIns.getInstance().getTuple(type.getComponentTypeRefs().size()), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetType visitUserType(JetUserType type, Void data) {
|
||||
JetUserType qualifier = type.getQualifier();
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated // Tuples are to be removed in Kotlin M4
|
||||
public class JetTupleType extends JetTypeElement {
|
||||
|
||||
@Deprecated // Tuples are to be removed in Kotlin M4
|
||||
public JetTupleType(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetTypeReference> getTypeArgumentsAsTypes() {
|
||||
return getComponentTypeRefs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull JetVisitorVoid visitor) {
|
||||
visitor.visitTupleType(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitTupleType(this, data);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Deprecated // Tuples are to be removed in Kotlin M4
|
||||
public List<JetTypeReference> getComponentTypeRefs() {
|
||||
return findChildrenByType(JetNodeTypes.TYPE_REFERENCE);
|
||||
}
|
||||
}
|
||||
@@ -330,11 +330,6 @@ public class JetVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitTypeElement(type, data);
|
||||
}
|
||||
|
||||
@Deprecated // Tuples are to be removed in Kotlin M4
|
||||
public R visitTupleType(JetTupleType type, D data) {
|
||||
return visitTypeElement(type, data);
|
||||
}
|
||||
|
||||
public R visitFunctionType(JetFunctionType type, D data) {
|
||||
return visitTypeElement(type, data);
|
||||
}
|
||||
|
||||
@@ -319,11 +319,6 @@ public class JetVisitorVoid extends PsiElementVisitor {
|
||||
visitTypeElement(type);
|
||||
}
|
||||
|
||||
@Deprecated // Tuples are to be removed in Kotlin M4
|
||||
public void visitTupleType(JetTupleType type) {
|
||||
visitTypeElement(type);
|
||||
}
|
||||
|
||||
public void visitFunctionType(JetFunctionType type) {
|
||||
visitTypeElement(type);
|
||||
}
|
||||
|
||||
@@ -192,12 +192,6 @@ public class TypeResolver {
|
||||
result[0] = TypeUtils.makeNullable(baseType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitTupleType(JetTupleType type) {
|
||||
// TODO: remove this method completely when tuples are droppped
|
||||
throw new IllegalStateException("Tuples are not supported: " + type.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitFunctionType(JetFunctionType type) {
|
||||
JetTypeReference receiverTypeRef = type.getReceiverTypeRef();
|
||||
|
||||
Reference in New Issue
Block a user