private -> internal where it's necessary
This commit is contained in:
@@ -21,7 +21,7 @@ import com.intellij.psi.PsiWhiteSpace
|
||||
import org.jetbrains.kotlin.lexer.JetTokens
|
||||
import org.jetbrains.kotlin.psi.psiUtil.siblings
|
||||
|
||||
private object EditCommaSeparatedListHelper {
|
||||
internal object EditCommaSeparatedListHelper {
|
||||
public fun <TItem: JetElement> addItem(list: JetElement, allItems: List<TItem>, item: TItem): TItem {
|
||||
return addItemBefore(list, allItems, item, null)
|
||||
}
|
||||
|
||||
+14
-14
@@ -839,19 +839,19 @@ private fun getCompileTimeType(c: JetType): CompileTimeType<out Any>? {
|
||||
|
||||
private class CompileTimeType<T>
|
||||
|
||||
private val BYTE = CompileTimeType<Byte>()
|
||||
private val SHORT = CompileTimeType<Short>()
|
||||
private val INT = CompileTimeType<Int>()
|
||||
private val LONG = CompileTimeType<Long>()
|
||||
private val DOUBLE = CompileTimeType<Double>()
|
||||
private val FLOAT = CompileTimeType<Float>()
|
||||
private val CHAR = CompileTimeType<Char>()
|
||||
private val BOOLEAN = CompileTimeType<Boolean>()
|
||||
private val STRING = CompileTimeType<String>()
|
||||
private val ANY = CompileTimeType<Any>()
|
||||
internal val BYTE = CompileTimeType<Byte>()
|
||||
internal val SHORT = CompileTimeType<Short>()
|
||||
internal val INT = CompileTimeType<Int>()
|
||||
internal val LONG = CompileTimeType<Long>()
|
||||
internal val DOUBLE = CompileTimeType<Double>()
|
||||
internal val FLOAT = CompileTimeType<Float>()
|
||||
internal val CHAR = CompileTimeType<Char>()
|
||||
internal val BOOLEAN = CompileTimeType<Boolean>()
|
||||
internal val STRING = CompileTimeType<String>()
|
||||
internal val ANY = CompileTimeType<Any>()
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
private fun <A, B> binaryOperation(
|
||||
internal fun <A, B> binaryOperation(
|
||||
a: CompileTimeType<A>,
|
||||
b: CompileTimeType<B>,
|
||||
functionName: String,
|
||||
@@ -860,12 +860,12 @@ private fun <A, B> binaryOperation(
|
||||
) = BinaryOperationKey(a, b, functionName) to Pair(operation, checker) as Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>>
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
private fun <A> unaryOperation(
|
||||
internal fun <A> unaryOperation(
|
||||
a: CompileTimeType<A>,
|
||||
functionName: String,
|
||||
operation: Function1<A, Any>,
|
||||
checker: Function1<Long, Long>
|
||||
) = UnaryOperationKey(a, functionName) to Pair(operation, checker) as Pair<Function1<Any?, Any>, Function1<Long, Long>>
|
||||
|
||||
private data class BinaryOperationKey<A, B>(val f: CompileTimeType<out A>, val s: CompileTimeType<out B>, val functionName: String)
|
||||
private data class UnaryOperationKey<A>(val f: CompileTimeType<out A>, val functionName: String)
|
||||
internal data class BinaryOperationKey<A, B>(val f: CompileTimeType<out A>, val s: CompileTimeType<out B>, val functionName: String)
|
||||
internal data class UnaryOperationKey<A>(val f: CompileTimeType<out A>, val functionName: String)
|
||||
|
||||
+5
-5
@@ -17,14 +17,14 @@
|
||||
package org.jetbrains.kotlin.resolve.constants.evaluate
|
||||
|
||||
import java.math.BigInteger
|
||||
import java.util.HashMap
|
||||
import java.util.*
|
||||
|
||||
/** This file is generated by org.jetbrains.kotlin.generators.evaluate:generate(). DO NOT MODIFY MANUALLY */
|
||||
|
||||
private val emptyBinaryFun: Function2<BigInteger, BigInteger, BigInteger> = { a, b -> BigInteger("0") }
|
||||
private val emptyUnaryFun: Function1<Long, Long> = { a -> 1.toLong() }
|
||||
internal val emptyBinaryFun: Function2<BigInteger, BigInteger, BigInteger> = { a, b -> BigInteger("0") }
|
||||
internal val emptyUnaryFun: Function1<Long, Long> = { a -> 1.toLong() }
|
||||
|
||||
private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?, Any>, Function1<Long, Long>>>
|
||||
internal val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?, Any>, Function1<Long, Long>>>
|
||||
= hashMapOf<UnaryOperationKey<*>, Pair<Function1<Any?, Any>, Function1<Long, Long>>>(
|
||||
unaryOperation(BOOLEAN, "not", { a -> a.not() }, emptyUnaryFun),
|
||||
unaryOperation(BOOLEAN, "toString", { a -> a.toString() }, emptyUnaryFun),
|
||||
@@ -102,7 +102,7 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
|
||||
unaryOperation(STRING, "toString", { a -> a.toString() }, emptyUnaryFun)
|
||||
)
|
||||
|
||||
private val binaryOperations: HashMap<BinaryOperationKey<*, *>, Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>>>
|
||||
internal val binaryOperations: HashMap<BinaryOperationKey<*, *>, Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>>>
|
||||
= hashMapOf<BinaryOperationKey<*, *>, Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>>>(
|
||||
binaryOperation(BOOLEAN, BOOLEAN, "and", { a, b -> a.and(b) }, emptyBinaryFun),
|
||||
binaryOperation(BOOLEAN, BOOLEAN, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun),
|
||||
|
||||
Reference in New Issue
Block a user