Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for getKaType (0.24 sec)

  1. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/typeProvider/AbstractHasCommonSubtypeTest.kt

                        if (aType == null) {
                            errors.add("'${a.text}' has no type at ${a.positionString}")
                            super.visitCallExpression(expression)
                            return
                        }
                        val b = valueArguments[1]
                        val bType = b.getArgumentExpression()?.getKaType()
                        if (bType == null) {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/typeInfoProvider/AbstractIsDenotableTest.kt

                            val ktType = if (parent != null && deparenthesize(parent.receiverExpression) == deparenthesize(base)) {
                                parent.receiverExpression.getKaType()
                            } else {
                                expression.getKaType()
                            }
                            val actualHasDenotableType = ktType?.isDenotable ?: error("${base.text} does not have a type.")
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KtExpressionTypeProvider.kt

         * - `Unit` type for statements;
         */
        public fun KtExpression.getKaType(): KaType? =
            withValidityAssertion { analysisSession.expressionTypeProvider.getKtExpressionType(this) }
    
        public fun KtExpression.getKtType(): KaType? = getKaType()
    
        /**
         * Returns the return type of the given [KtDeclaration] as [KaType].
         *
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:35 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/compilerFacility/AbstractFirPluginPrototypeCompilerFacilityTestWithAnalysis.kt

                        analyze(declaration) {
                            val initializer = declaration.initializer ?: return@analyze
                            initializer.getKaType()
                        }
                    }
                })
            }
            // After running AA, run CodeGen.
            super.doTestByMainFile(mainFile, mainModule, testServices)
        }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/expressionTypeProvider/AbstractHLExpressionTypeTest.kt

            } ?: error("expect an expression but got ${selected.text}, ${selected::class}")
            val type = executeOnPooledThreadInReadAction {
                analyseForTest(expression) {
                    var ktType = expression.getKaType()
                    if (Directives.APPROXIMATE_TYPE in mainModule.testModule.directives) {
                        ktType = ktType?.approximateToSuperPublicDenotableOrSelf(true)
                    }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/psiTypeProvider/AbstractAnalysisApiExpressionPsiTypeProviderTest.kt

                ?: error("Can't find psi context for $containingDeclaration")
    
            val actual = analyze(mainFile) {
                val returnType = declarationAtCaret.getKaType()
                if (returnType != null) {
                    prettyPrint {
                        appendLine("${KaType::class.simpleName}: ${AnalysisApiPsiTypeProviderTestUtils.render(analysisSession, returnType)}")
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  7. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/subtyping/AbstractSemanticSubtypingTest.kt

            return when (element) {
                is KtProperty -> element.getVariableSymbol().returnType
                is KtExpression -> element.getKaType() ?: error("Expected the selected expression to have a type.")
                else -> error("Expected a property or an expression.")
            }
        }
    }
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/AbstractTypeScopeTest.kt

            val expression = testServices.expressionMarkerProvider.getSelectedElementOfType<KtExpression>(mainFile)
            analyseForTest(expression) {
                val type = expression.getKaType()
                    ?: error("expression $expression is not typable")
                val typeScope = type.getTypeScope()
                val declaredScopeByTypeScope = typeScope?.getDeclarationScope()
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KtScopeProvider.kt

         *
         * Inside the `LIST_KT_ELEMENT.getKaType().getTypeScope()` would contain the `get(i: Int): String` method with substituted type `T = String`
         *
         * @return type scope for the given type if given `KaType` is not error type, `null` otherwise.
         * Returned [KaTypeScope] includes synthetic Java properties.
         *
         * @see KaTypeScope
         * @see KaTypeProviderMixIn.getKaType
         */
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:35 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KtTypeProvider.kt

         *
         * This may raise an exception if the resolution ends up with an unexpected kind.
         */
        public fun KtTypeReference.getKaType(): KaType =
            withValidityAssertion { analysisSession.typeProvider.getKtType(this) }
    
        public fun KtTypeReference.getKtType(): KaType = getKaType()
    
        /**
         * Resolve [KtDoubleColonExpression] and return [KaType] of its receiver.
         *
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top