Commit Graph

88383 Commits

Author SHA1 Message Date
Simon Ogorodnik 5efbd016bd Inference: Respect stub-type nullability in common super-type 2021-12-15 22:23:00 +03:00
Simon Ogorodnik 19a9091966 FIR: Add correct Any? supertype for stub types 2021-12-15 22:23:00 +03:00
Simon Ogorodnik 0d81e14904 FIR: Remove default constraint stub type == synthetic variable 2021-12-15 22:22:59 +03:00
Simon Ogorodnik 3fadf1cb46 FIR: Avoid creating new stub type constructors on nullability replacing 2021-12-15 22:22:59 +03:00
Simon Ogorodnik 61ea65906c FIR: Implement captured type substitution 2021-12-15 22:22:58 +03:00
Simon Ogorodnik 476a7727da FIR: Unmute passing black-box tests 2021-12-15 22:22:57 +03:00
Simon Ogorodnik 2e69f7732c FIR: Add more tests for delegate inference 2021-12-15 22:22:57 +03:00
Simon Ogorodnik bb411cbba7 FIR: Try to implement delegate inference by using stub types chain 2021-12-15 22:22:56 +03:00
Simon Ogorodnik 7b8ece8758 FIR: Make constraint injector treat stub types as type variables 2021-12-15 22:22:55 +03:00
Simon Ogorodnik 19e2409284 FIR: Remove duplication of delegateExpression in property delegates 2021-12-15 22:22:55 +03:00
Simon Ogorodnik 196be93d42 FIR: Add separate type constructor to stub types 2021-12-15 22:22:54 +03:00
Simon Ogorodnik 2e01377ce0 FIR: Substitute dispatch receiver in substitution overrides 2021-12-15 22:22:53 +03:00
Simon Ogorodnik 6cf2c6f93a Select non-DeclaredUpperBound for initial when simplifying constraint 2021-12-15 22:22:52 +03:00
Simon Ogorodnik 91b629d16a Refactor. Remove ConstraintPosition data duplication 2021-12-15 22:22:52 +03:00
Mikhail Glukhikh 4d9e919f7e FIR: preliminary refactoring of delegate resolve 2021-12-15 22:22:51 +03:00
Mikhail Glukhikh a19495cb26 FIR: add test with resolve problem in delegate 2021-12-15 22:22:50 +03:00
Roman Golyshev 89c3e04a36 [FIR IDE] Rethrow IndexNotReadyException from KtFirReferenceResolver
Resolve can be called even when the indices are not ready. In such cases
the `IndexNotReadyException` can be intentionally ignored by the
platform code

To make our code play nice with the platform, from now on we do not
wrap `IndexNotReadyException` into another exception - instead we
just let it fly and be ignored by the platform. If the platform
doesn't choose to ignore it, then it will be showed as an error
as usual
2021-12-15 22:12:00 +03:00
Dmitriy Novozhilov 23f5c22684 [Test] Update testdata of parcelize 2021-12-15 21:37:32 +03:00
Dmitriy Novozhilov 4f20f647d2 Advance bootstrap to 1.6.20-dev-6927 2021-12-15 21:37:31 +03:00
Roman Artemev 1a64e2da91 [KLIB] Add klib layout tests
- currently only file paths are checked
2021-12-15 21:13:53 +03:00
Roman Artemev fb84287ae0 [KLIB] Compute relative path instead of absolute if relative base is provided
- normalize  path if required
 - path it in JS/Native
 - path null for JVM (temporary)
 - fix build
2021-12-15 21:13:52 +03:00
Roman Artemev a68eabac0a [K/N] Setup config about path relativeness and normalization in config 2021-12-15 21:13:52 +03:00
Roman Artemev 893582fa65 [JS IR] Setup config about path relativeness and normalization in config 2021-12-15 21:13:51 +03:00
Roman Artemev bc5dea860e [KLIB] Add relative path base configuration key 2021-12-15 21:13:50 +03:00
Roman Artemev 526c85f820 [KLIB] Add CLI key to provide relative path base 2021-12-15 21:13:50 +03:00
Evgeniy.Zhelenskiy ec2e96f3e4 Regenerate inline class tests as 1 arg value classes 2021-12-15 17:14:22 +00:00
Nikolay Krasko 5ac4722be4 Run firCompilerTest in separate configuration 2021-12-15 19:18:56 +03:00
Nikolay Krasko ee507ceaed Simplify mapping between CI and test tasks 2021-12-15 19:18:56 +03:00
Nikolay Krasko 00f0978b1d Minor: reformat + clean warnings in org.jetbrains.kotlin.generators.arguments.test 2021-12-15 19:18:55 +03:00
Nikolay Krasko e733aa21d5 Fix error instead of muting it in kapt tests 2021-12-15 19:18:55 +03:00
Nikolay Krasko 5162ef31fc Rename task kaptIdeTest -> kaptTests 2021-12-15 19:18:54 +03:00
Nikolay Krasko 85a3c9e251 Restore running :generators:test 2021-12-15 19:18:53 +03:00
Nikolay Krasko a74c68c70a Regenerate gradle options 2021-12-15 19:18:53 +03:00
Nikolay Krasko bfd540e9e6 Fix compile:android-test:generateAndroidTests
Don't read absent file with disabled plugins during creating Kotlin
core environment.

Exception in thread "main" java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
	at com.intellij.ide.plugins.PluginManagerCore.readBrokenPluginFile(PluginManagerCore.java:249)
	at com.intellij.ide.plugins.PluginManagerCore.getBrokenPluginVersions(PluginManagerCore.java:241)
	at com.intellij.ide.plugins.PluginManagerCore.createLoadingResult(PluginManagerCore.java:822)
	at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:64)
	at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1318)
	at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:287)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:622)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:592)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForTests(KotlinCoreEnvironment.kt:505)
	at org.jetbrains.kotlin.android.tests.CodegenTestsOnAndroidGenerator$FilesWriter.writeFilesOnDisk(CodegenTestsOnAndroidGenerator.kt:214)
	at org.jetbrains.kotlin.android.tests.CodegenTestsOnAndroidGenerator$FilesWriter.writeFilesOnDiskIfNeeded(CodegenTestsOnAndroidGenerator.kt:208)
2021-12-15 19:18:52 +03:00
Nikolay Krasko 71d84669f1 Remove idea tasks 2021-12-15 19:18:51 +03:00
Nikolay Krasko f2d649a7a1 Add dependency on dist for fir-plugin-prototype
> FirPluginDiagnosticTestGenerated$MemberGen.testClassWithCompanionObject
> java.lang.IllegalStateException: dist/kotlin-stdlib-jvm-minimal-for-test.jar does not exist. Run 'gradlew dist'
2021-12-15 19:18:50 +03:00
Leonid Startsev 2eac2ff3a2 Support Array<KClass> in instantiated annotations
#KT-47703 Fixed
2021-12-15 16:05:29 +00:00
Leonid Startsev 4df34a20e7 Fix classSerializerAsObject test that got broken after conflict-merge
with b131c52889
2021-12-15 17:18:18 +03:00
Tianyu Geng 4d2074fb66 Analysis API: allow creating type from type alias
There does not seem to be any reason to limit the type creator to only
create types of concrete class or object but not type alias.
2021-12-15 16:09:33 +03:00
Tianyu Geng 5fbe5981f7 Analysis API: add KtType.isDenotable() 2021-12-15 16:09:31 +03:00
Tianyu Geng 2f393cdd02 FE1.0 Analysis API: get smartcast if available with getKtExpressionType
The current implementation still does not work with multicast. In
addition, it appears FE1.0 does not attempt smart cast if it's not used.
2021-12-15 16:09:29 +03:00
Tianyu Geng a5844b754e Type Approximation: add separate flag to control approx. anonymous type
This extra flexibility is useful for IDE where we always want to
approximate anonymous types but may not want to approximate other local
 types
2021-12-15 16:09:27 +03:00
Yahor Berdnikau c5c606924c Move Kotlin daemon jvm args to kotlin.daemon.jvmargs property 2021-12-15 10:37:52 +00:00
Ilya Goncharov db9640c3b3 [Gradle, JS] Add gradle property for per-module/whole-program
Merge-request: KT-MR-5200
2021-12-15 09:08:45 +00:00
Alexander Shabalin 7eb0798d64 [K/N] Fix SafePointSlowPath in STMS
^KT-48537

Merge-request: KT-MR-5257
2021-12-15 07:54:07 +00:00
Jinseong Jeon e36cc87b19 LC: introduce KotlinLightTypeParameterBuilder (w/ origin) 2021-12-15 10:41:50 +03:00
Jinseong Jeon 7757fd312b FIR LC: make fields in objects static 2021-12-15 08:20:03 +03:00
Jinseong Jeon 82c2f0c6fd FIR LC: use unified annotations' ClassId or FqName 2021-12-15 08:20:02 +03:00
Nikolay Krasko 4e60a2dbe1 Remove unused JUnitMode.Mix mode
It's not used by now, and there's are known problems with it check
KTI-712.

If transition to JUnit5 is needed, creating another module might
be a better option.
2021-12-14 23:07:20 +03:00
Nikolay Krasko 1efd583e14 Fix running nested classes with JUnit 5 causes outer class tests execution
Note: there might be a performance issue with running tests,
the reason why custom filtering was added to the tests running.
It's not tested and should be addressed separately

Try run IrBlackBoxCodegenTestGenerated.Annotations. Everything in the
outer class IrBlackBoxCodegenTestGenerated is run instead.
This is not an IDEA problem, since it reproduces from
the command line too.

^KTI-712 Fixed
2021-12-14 23:07:19 +03:00