Permalink
Browse files

Removed JetTupleType.

  • Loading branch information...
1 parent 2807664 commit d9b6a5c2badf9302b0ac32780d632bda22327561 Evgeny Gerashchenko committed Mar 19, 2013
@@ -88,11 +88,6 @@ public JetType visitFunctionType(JetFunctionType type, Void data) {
}
@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 R visitUserType(JetUserType type, D data) {
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 void visitUserType(JetUserType type) {
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);
}
@@ -193,12 +193,6 @@ else if (TypeUtils.hasNullableSuperType(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();
JetType receiverType = receiverTypeRef == null ? null : resolveType(scope, receiverTypeRef, trace, checkBounds);

0 comments on commit d9b6a5c

Please sign in to comment.