Commit Graph

96023 Commits

Author SHA1 Message Date
Mikhail Glukhikh cb39221f85 FIR2IR: drop unused code with annotation placeholder 2022-11-11 13:30:37 +00:00
Mikhail Glukhikh 3a81174a4c FIR2IR: support static fake overrides (functions) #KT-53441 Fixed 2022-11-11 13:30:36 +00:00
Mikhail Glukhikh ec77e1896c FIR2IR: cleanup CallAndReferenceGenerator 2022-11-11 13:30:35 +00:00
Mikhail Glukhikh f070401bb5 K2: fix visibility checks for static overrides via imported from static
#KT-53441 In Progress
2022-11-11 13:30:35 +00:00
Mikhail Glukhikh cc1a094b6c K2: rename importedFromObject -> importedFromObjectOrStatic 2022-11-11 13:30:34 +00:00
Mikhail Glukhikh 2b2cc07c89 FirObjectImportedCallableScope: fix wrong variable name 2022-11-11 13:30:34 +00:00
Mikhail Glukhikh d16a4ae647 FirClassSubstitutionScope: partial cleanup 2022-11-11 13:30:33 +00:00
Mikhail Glukhikh 53f37a3893 FIR: always use class-based dispatch receiver type in class member helpers 2022-11-11 13:30:33 +00:00
Mikhail Glukhikh d4fc2248ff FIR: make class member helper names more consistent 2022-11-11 13:30:32 +00:00
pyos e2a83a0ed0 FIR: unwrap intersection overrides when looking for owner class
But not substitution overrides! This is important if the method called
is an intersection override where one of the intersected types is a
subtype of a generic type.
2022-11-11 13:30:32 +00:00
pyos 9f65c6022c Move substitution override unwrapping to FirVisibilityChecker
This is because it is only needed for the declaration itself, not for
the containing class. Currently there is no difference because
`containingNonLocalClass` will look at the dispatch receiver argument if
one exists anyway, and for substitution/intersection overrides one must
exist.
2022-11-11 13:30:31 +00:00
Yan Zhulanow 40f1bc8480 [Analysis API] Allow disabling sealed class inheritor searcher in tests
Index-less implementation of sealed class inheritor searcher affects
Java caches, making laziness work quite differently, comparing to IDEs.
2022-11-11 11:28:39 +00:00
Yan Zhulanow b770e5d02f [LL API] Get designation correctly for enum value members (KTIJ-23458)
Although being a 'KtClass' in the PSI, 'KtEnumEntry' is a callable in
Analysis API, and its direct members should also be treated as local.
2022-11-11 11:28:38 +00:00
Yan Zhulanow 4d41ac09df [Analysis API] Treat inapplicable declarations safely (KTIJ-23458)
Make 'getClassOrObjectSymbol()' and 'getNamedClassOrObjectSymbol()'
return 'null' for inapplicable PSI declarations.
2022-11-11 11:28:38 +00:00
Yan Zhulanow 0a8b9c821c [FE] Add missing 'ClassId' check in Kotlin class loading (KTIJ-23435)
'findKotlinClassOrContent()' does not really distinguish between
outer class names and package path components, so it might return
'foo/bar/Baz.Boo' for 'foo/bar/Baz/Boo'. Possibly because
 'findKotlinClassOrContent()' potentially returns a raw byte array,
 ClassId checking is supposed to be performed in
 'extractClassMetadata()'. For Java, it happens inside
 'FirJavaFacade.findClass()', yet for Kotlin the check was absent.
2022-11-11 11:28:37 +00:00
Yan Zhulanow 04ccd3710f [LC] Compute modifiers/annotations lazily (KTIJ-23442) 2022-11-11 11:28:37 +00:00
Yan Zhulanow 48fbb62658 [FE] Add missing 'originalForSubstitutionOverrideAttr' to parameters
'originalForSubstitutionOverrideAttr' is supposed to be on all
'SubstitutionOverride' declarations, and certain functionality, such as
'KtFirOverrideInfoProvider#getOriginalOverriddenSymbol()' depends on it.

Absence of the attribute might trigger infinite loop/recursion in
substitution unwrapping.
2022-11-11 11:28:36 +00:00
Yan Zhulanow 01009ed75b [LL API] Seek for the containing file in the right module (KTIJ-22808)
It's not guaranteed that the declaration for which we need a containing
file is from the currently analyzed module.
2022-11-11 11:28:36 +00:00
Yan Zhulanow 76931522e0 [Analysis API] Fix designation path for constructors (KTIJ-22808)
Local declaration check performs incorrectly for constructors as they
always have local callable IDs.
2022-11-11 11:28:35 +00:00
Yan Zhulanow 61ce9fe524 [FE] Fix source element duplication in object literal expressions 2022-11-11 11:28:35 +00:00
Yan Zhulanow ea3f550b58 [FE] Support analyzable files throughout all 'KtPsiFactory' API
Before, the only way of getting analyzable elements was to create an
analyzable file by using 'createAnalyzableFile()'. So made all utilities
available in 'KtPsiFactory' useless as they delegate to 'createFile()'
that always set the 'doNotAnalyze' flag.

The new behavior is to pass the 'analysisContext' instead if it is
passed to the 'KtPsiFactory' constructor.

The newly appeared API is going to be used in the Kotlin's UAST
implementation.
2022-11-11 11:28:34 +00:00
Yan Zhulanow f3c4ae8bbf [Pill] Add the ':kotlin-gradle-plugin-annotations' module 2022-11-11 11:28:34 +00:00
Yan Zhulanow 6b198fd85f [Pill] Support 'java-test-fixtures' plugin 2022-11-11 11:28:33 +00:00
Yan Zhulanow 47b5ea0fc7 [Pill] Fix unit test running 2022-11-11 11:28:33 +00:00
Yan Zhulanow 8e494ceb99 [Pill] Update default run configurations 2022-11-11 11:28:32 +00:00
Yan Zhulanow 121599c6d4 [Pill] Prevent 'intellij' directory indexing in cooperative dev mode 2022-11-11 11:28:32 +00:00
Ilya Kirillov 4b7cacd55e [FIR] do not ignore nested type aliases in FirNestedClassifierScope 2022-11-11 12:00:01 +01:00
Ilya Kirillov 7059f7fbe7 [fir] mark functional type contexts receivers as not traversed in RawFirBuilderTotalKotlinTestCase 2022-11-11 12:00:01 +01:00
Ilya Kirillov 2378437b30 [Analysis API FIR] do not create resolved KtTypes for unresolved ones 2022-11-11 12:00:00 +01:00
Ilya Kirillov 7545ccad81 [Analysis API FE1.0] do not expose ExtensionFunctionType from functional types
it's a frontend implementation detail
2022-11-11 12:00:00 +01:00
Ilya Kirillov b47675916f [Analysis API] remove old renderer code 2022-11-11 12:00:00 +01:00
Ilya Kirillov 10b593ba8c [Analysis API] mute tests for expect/actual rendering as expect/actuals are not suported in symbols yet
^KT-54036
^KTIJ-23268
2022-11-11 11:59:59 +01:00
Ilya Kirillov 26ec7ec296 [Analysis API] update testdata after renderer rework
The new testdata seems to be more correct or just different

^KTIJ-23268
2022-11-11 11:59:59 +01:00
Ilya Kirillov d1eb7c51f1 [Analysis API] rework renderer
^KTIJ-23268 fixed
2022-11-11 11:59:58 +01:00
Ilya Kirillov f8ed993307 [Analysis API FE1.0] fix functional types for KFunction
previously, they were throwing an exception
2022-11-11 11:59:58 +01:00
Ilya Kirillov 57ee78a7f5 [Analysis API FE1.0] fix constructor symbol parameters
They should not come from the class itself
2022-11-11 11:59:57 +01:00
Ilya Kirillov 3fb5ce3bdd [Analysis API FE1.0] fix equals/hashCode for symbols 2022-11-11 11:59:57 +01:00
Ilya Kirillov 2ca89e4983 [Analysis API FE1.0] fix constructors in scopes 2022-11-11 11:59:57 +01:00
Ilya Kirillov e706c49eb0 [Analysis API FE1.0] remove Any? type parameter bound 2022-11-11 11:59:56 +01:00
Ilya Kirillov 068168bc3c [fir] change setter parameter name to value 2022-11-11 11:59:56 +01:00
Ilya Kirillov ed1751bbc6 [fir] move mutable/base collection pair map do StandardClassIds to further reuse it 2022-11-11 11:59:56 +01:00
Ilya Kirillov 725ae1fc65 [Analysis API] separate non-class error types from class error types and add information about type qualifiers
it's needed for type printing in renderer
2022-11-11 11:59:55 +01:00
Igor Yakovlev 210212c284 [WASM] Remove redundant parameters for w3c dynamic getters 2022-11-11 10:53:05 +00:00
nataliya.valtman 592db99cfe KT-53402 Add test for resources ignore 2022-11-11 11:04:27 +01:00
Jinseong Jeon 2131cb4fe0 AA FIR: functional type for anonymous function
^KTIJ-17657 In progress
2022-11-11 10:15:44 +01:00
Sergej Jaskiewicz 6d58d9cb8d [JS] Attempt to fix OOM in Node.js
But there are still segfaults, see
https://github.com/nodejs/node/issues/45410
2022-11-10 23:17:42 +00:00
pyos a968193349 K2: fix logic for supertypes annotation deserialization 2022-11-10 22:12:34 +00:00
pyos 456fe858a0 FE: commonize logic for value class representation building 2022-11-10 22:12:08 +00:00
Igor Yakovlev b6eb2b3620 [WASM] Add w3c bindings 2022-11-10 14:22:44 +00:00
Zalim Bashorov 4bafa2c9db [Wasm, Gradle] Quick fix for broken NewMultiplatformIT.testWasmD8Test 2022-11-10 13:54:10 +00:00