Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for KaErrorConstantValue (0.14 sec)

  1. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/base/KtConstantValue.kt

         */
        public class KaErrorConstantValue(
            public val errorMessage: String,
            override val sourcePsi: KtElement?,
        ) : KaConstantValue(ConstantValueKind.Error) {
            override val value: Nothing
                get() = error("Cannot get value for KaErrorConstantValue")
    
            override fun renderAsKotlinConstant(): String {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirCompileTimeConstantProvider.kt

                    try {
                        FirCompileTimeConstantEvaluator.evaluateAsKtConstantValue(fir)
                    } catch (e: ArithmeticException) {
                        KaConstantValue.KaErrorConstantValue(e.localizedMessage, sourcePsi)
                    }
                }
                // For invalid code like the following,
                // ```
                // when {
                //   true, false -> {}
                // }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Fri Jun 07 11:53:09 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt

            }
    
            return this.modality
        }
    
    internal fun ConstantValue<*>.toKtConstantValue(): KaConstantValue {
        return when (this) {
            is ErrorValue.ErrorValueWithMessage -> KaConstantValue.KaErrorConstantValue(message, sourcePsi = null)
            is BooleanValue -> KaConstantValue.KaBooleanConstantValue(value, sourcePsi = null)
            is DoubleValue -> KaConstantValue.KaDoubleConstantValue(value, sourcePsi = null)
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top