From 6aff3c6d07a5657953e503a88c0f3a1f7993db99 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 12 Aug 2022 21:11:49 +0200 Subject: [PATCH] Update misc test data after introducing rangeUntil member #KT-52933 --- .../scopes/memberScopeByFqName/Int.pretty.txt | 16 +++ .../scopes/memberScopeByFqName/Int.txt | 136 ++++++++++++++++++ .../operatorsOverloading/until/simple.fir.kt | 7 - .../operatorsOverloading/until/simple.kt | 3 +- .../constFromBuiltins__kotlin.Int.ir.txt | 24 ++++ 5 files changed, 178 insertions(+), 8 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.fir.kt diff --git a/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.pretty.txt b/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.pretty.txt index 381d4bfb4ab..f33a2198d43 100644 --- a/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.pretty.txt +++ b/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.pretty.txt @@ -94,6 +94,22 @@ operator fun rangeTo(other: kotlin.Long): kotlin.ranges.LongRange operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange +@kotlin.SinceKotlin(version = "1.7") +@kotlin.ExperimentalStdlibApi +operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange + +@kotlin.SinceKotlin(version = "1.7") +@kotlin.ExperimentalStdlibApi +operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange + +@kotlin.SinceKotlin(version = "1.7") +@kotlin.ExperimentalStdlibApi +operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange + +@kotlin.SinceKotlin(version = "1.7") +@kotlin.ExperimentalStdlibApi +operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation operator fun rem(other: kotlin.Byte): kotlin.Int diff --git a/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.txt b/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.txt index 93472395bca..37045ff8930 100644 --- a/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.txt +++ b/analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.txt @@ -1062,6 +1062,142 @@ KtFunctionSymbol: getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" deprecationStatus: null +KtFunctionSymbol: + annotationsList: [ + kotlin/SinceKotlin(version = "1.7") + psi: null + kotlin/ExperimentalStdlibApi() + psi: null + ] + callableIdIfNonLocal: kotlin/Int.rangeUntil + contextReceivers: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: true + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: rangeUntil + origin: LIBRARY + receiverType: null + returnType: kotlin/ranges/IntRange + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(other) + ] + visibility: Public + getDispatchReceiver(): kotlin/Int + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + +KtFunctionSymbol: + annotationsList: [ + kotlin/SinceKotlin(version = "1.7") + psi: null + kotlin/ExperimentalStdlibApi() + psi: null + ] + callableIdIfNonLocal: kotlin/Int.rangeUntil + contextReceivers: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: true + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: rangeUntil + origin: LIBRARY + receiverType: null + returnType: kotlin/ranges/IntRange + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(other) + ] + visibility: Public + getDispatchReceiver(): kotlin/Int + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + +KtFunctionSymbol: + annotationsList: [ + kotlin/SinceKotlin(version = "1.7") + psi: null + kotlin/ExperimentalStdlibApi() + psi: null + ] + callableIdIfNonLocal: kotlin/Int.rangeUntil + contextReceivers: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: true + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: rangeUntil + origin: LIBRARY + receiverType: null + returnType: kotlin/ranges/LongRange + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(other) + ] + visibility: Public + getDispatchReceiver(): kotlin/Int + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + +KtFunctionSymbol: + annotationsList: [ + kotlin/SinceKotlin(version = "1.7") + psi: null + kotlin/ExperimentalStdlibApi() + psi: null + ] + callableIdIfNonLocal: kotlin/Int.rangeUntil + contextReceivers: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: true + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: rangeUntil + origin: LIBRARY + receiverType: null + returnType: kotlin/ranges/IntRange + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(other) + ] + visibility: Public + getDispatchReceiver(): kotlin/Int + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + KtFunctionSymbol: annotationsList: [ kotlin/SinceKotlin(version = "1.1") diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.fir.kt deleted file mode 100644 index 0ee75ae9300..00000000000 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.fir.kt +++ /dev/null @@ -1,7 +0,0 @@ -// !LANGUAGE: +RangeUntilOperator - -fun main(n: Int) { - for (i in 0..<n) { - - } -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt index 4ec6e701a2d..3b1f624a8fc 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt @@ -1,7 +1,8 @@ +// FIR_IDENTICAL // !LANGUAGE: +RangeUntilOperator fun main(n: Int) { - for (i in 0..<n) { + for (i in 0.. ($this:kotlin.Int, other:) returnType: [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + annotations: + (1 = '1.7') + + $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType: [operator] + annotations: + (1 = '1.7') + + $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + annotations: + (1 = '1.7') + + $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + annotations: + (1 = '1.7') + + $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] annotations: (1 = '1.1')