From 1b57889773005779d1fb9ab403542595a6f6418a Mon Sep 17 00:00:00 2001 From: Arsen Nagdalian Date: Wed, 15 Jul 2020 20:23:50 +0300 Subject: [PATCH] Clean the code --- compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffect.kt | 4 ---- .../psi/src/org/jetbrains/kotlin/psi/KtContractEffectList.kt | 4 ---- .../kotlin/psi/stubs/elements/KtContractEffectElementType.kt | 3 --- compiler/testData/psi/FunctionWithMultilineContract.kt | 2 +- .../testData/psi/FunctionWithTypeConstraintsAndContract.kt | 2 +- compiler/testData/psi/SimpleFunctionWithContract.kt | 2 +- 6 files changed, 3 insertions(+), 14 deletions(-) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffect.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffect.kt index 0a06a0ec568..44435bc515b 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffect.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffect.kt @@ -9,10 +9,6 @@ import com.intellij.lang.ASTNode import org.jetbrains.kotlin.psi.stubs.KotlinContractEffectStub import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes -//class KtContractEffect(node: ASTNode) : KtDeclarationImpl(node) { -// -//} - class KtContractEffect: KtElementImplStub { // TODO: check constructors public constructor(node: ASTNode): super(node) public constructor(stub: KotlinContractEffectStub): super(stub, KtStubElementTypes.CONTRACT_EFFECT) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffectList.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffectList.kt index 30297b0092c..2a1b18d75c4 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffectList.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtContractEffectList.kt @@ -9,10 +9,6 @@ import com.intellij.lang.ASTNode import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes -//class KtContractEffectList(node: ASTNode): KtDeclarationImpl(node) { -// -//} - class KtContractEffectList : KtElementImplStub> { public constructor(node: ASTNode): super(node) public constructor(stub: KotlinPlaceHolderStub): super(stub, KtStubElementTypes.CONTRACT_EFFECT_LIST) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtContractEffectElementType.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtContractEffectElementType.kt index 03a4b6e123a..b5c86d289ca 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtContractEffectElementType.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtContractEffectElementType.kt @@ -16,16 +16,13 @@ import org.jetbrains.kotlin.psi.stubs.impl.KotlinContractEffectStubImpl class KtContractEffectElementType(debugName: String, psiClass: Class) : KtStubElementType(debugName, psiClass, KotlinContractEffectStub::class.java) { override fun serialize(stub: KotlinContractEffectStub, dataStream: StubOutputStream) { -// TODO("Not yet implemented") } override fun deserialize(dataStream: StubInputStream, parentStub: StubElement?): KotlinContractEffectStub { -// TODO("Not yet implemented") return KotlinContractEffectStubImpl(parentStub, this) } override fun createStub(psi: KtContractEffect, parentStub: StubElement?): KotlinContractEffectStub { -// TODO("Not yet implemented") return KotlinContractEffectStubImpl(parentStub, this) } } \ No newline at end of file diff --git a/compiler/testData/psi/FunctionWithMultilineContract.kt b/compiler/testData/psi/FunctionWithMultilineContract.kt index acbc8f4de7a..1ac1aaba422 100644 --- a/compiler/testData/psi/FunctionWithMultilineContract.kt +++ b/compiler/testData/psi/FunctionWithMultilineContract.kt @@ -10,4 +10,4 @@ fun baz(num: Int?, element: MyElement, block: () -> Unit): Int contract [ return 1; } return 0 -} \ No newline at end of file +} diff --git a/compiler/testData/psi/FunctionWithTypeConstraintsAndContract.kt b/compiler/testData/psi/FunctionWithTypeConstraintsAndContract.kt index 206e01aa604..17aaa220cb8 100644 --- a/compiler/testData/psi/FunctionWithTypeConstraintsAndContract.kt +++ b/compiler/testData/psi/FunctionWithTypeConstraintsAndContract.kt @@ -9,4 +9,4 @@ fun someFunctionWithTypeConstraints(arg: E?, block: () -> T): String block() arg ?: throw NullArgumentException() return "some string" -} \ No newline at end of file +} diff --git a/compiler/testData/psi/SimpleFunctionWithContract.kt b/compiler/testData/psi/SimpleFunctionWithContract.kt index c329ae2d0ba..d1a70a57d97 100644 --- a/compiler/testData/psi/SimpleFunctionWithContract.kt +++ b/compiler/testData/psi/SimpleFunctionWithContract.kt @@ -1,3 +1,3 @@ fun foo(s: String?) contract [returns() implies (s != null)] { s ?: throw NullArgumentException() -} \ No newline at end of file +}