Commit Graph

80218 Commits

Author SHA1 Message Date
Dmitry Savvinov 168c692a27 Use overriding util with proper typechecker for overriding in LazyClassMemberScope
Note that LazyClassMemberScope actually has a separate field for
KotlinTypeRefiner, and it might be actually different from the one in
c.kotlinTypeChecker.

The one in c.kotlinTypeChecker is the refiner of *owner* module, i.e. a
module in which the class has been declared. If we have a class Foo :
Expect in common, then the refiner will be from common, and thus it
won't be able to refine supertypes to their platform-dependent values.

The one passed in constructor is actual refiner of dependant-module.
Say, if we're looking at Foo from the point of view of jvmMain, then
we'll create a (view-dependent) LCMS for that, and it will contain
refiner for jvmMain.

It is important to use proper refiner, otherwise the idea of having
"module-dependent view" breaks, and we might suddenly mismatch some
overrides with expect-classes in their signatures.

^KT-44898 Fixed
2021-02-26 12:37:01 +03:00
Dmitry Savvinov 9616eb94fd Add test on KT-44898 (MPP + type refinement + complex inheritance)
The current behaviour is undesired (ABSTRACT_MEMEBER_NOT_IMPLEMENTED
reported on class Concrete), will be fixed in the next commit
2021-02-26 12:37:01 +03:00
Dmitry Savvinov e3d4c440b5 Minor: rename createMemberScope -> createScopesHolderForClass 2021-02-26 12:37:01 +03:00
Mikhail Glukhikh 2bf3abcb29 FIR: cache accessor symbols in JavaClassUseSiteMemberScope 2021-02-26 12:27:07 +03:00
Mikhail Glukhikh 750a39a053 JavaClassUseSiteMemberScope: optimize createOverridePropertyIfExists
Avoid calculating getter & setter twice
2021-02-26 12:27:01 +03:00
Aleksei.Cherepanov 07d11508a7 Generate JvmMultifileClass tests for Gradle 2021-02-26 11:31:17 +03:00
Denis.Zharkov e6b61ecc22 Fix incorrectly generated tests 2021-02-26 10:46:54 +03:00
Mikhael Bogdanov 82f1b8159c Remove deprecated "-XX:-FailOverToOldVerifier" as it breaks JDK on TC 2021-02-26 07:48:20 +01:00
Tianyu Geng 2484729bd7 FIR IDE: fix redundant
Apparently there is a race condition when collecting the `fromPhase`.
This causes the same resolver to run multiple times on FIR.

^KT-45121 Fixed
2021-02-25 23:31:37 +01:00
Alexander Udalov acc2256de9 IR: support smart cast values in RangeContainsLowering
#KT-44878 Fixed
2021-02-25 21:00:09 +01:00
Alexander Udalov 820762ca16 IR: add isUnsignedType/getUnsignedType 2021-02-25 21:00:09 +01:00
Alexander Udalov 0ebdf7c3c4 IR: add getPrimitiveType, optimize some usages of isInt/isByte/... 2021-02-25 21:00:09 +01:00
Alexander Udalov 17ee10a0d8 Minor, fix compilation warning in DurationUnit.kt 2021-02-25 21:00:09 +01:00
Victor Petukhov 94e6ec7dfd Fix test after 27846f4532 2021-02-25 22:29:45 +03:00
Yahor Berdnikau 6b56b7cca6 Fix tests are using slightly different test file names from actual. 2021-02-25 20:11:43 +01:00
Denis.Zharkov 4fffe7b9c8 FIR: Fix VerifyError caused by private delegates
^KT-45048 Fixed
2021-02-25 19:30:15 +03:00
Denis.Zharkov ace66b7179 FIR: Prettify visibility resolution for private constructors 2021-02-25 19:30:15 +03:00
Denis.Zharkov 9d7e40ad99 Minor. Reformat FirStatusResolveTransformer.kt 2021-02-25 19:30:15 +03:00
Ilmir Usmanov 2523ea1ef4 Do not add @JvmInline annotation on JS and Native 2021-02-25 16:07:00 +01:00
Ilmir Usmanov 2df049fc03 Minor. Remove outdated test and update maven test 2021-02-25 16:06:58 +01:00
Ilmir Usmanov 8c31fcb615 Add inline class -> @JvmInline value class intention 2021-02-25 16:06:54 +01:00
Ilmir Usmanov d67e4f0c48 Rename inline class -> @JvmInline value class in stdlib and compiler 2021-02-25 16:06:51 +01:00
Ilmir Usmanov 62123d72e2 IC: Add inline class -> @JvmInline value class warning 2021-02-25 16:06:47 +01:00
Alexander Udalov b417786fd4 JVM IR: do not hide constructor with inline class in anonymous object
#KT-45131 Fixed
2021-02-25 14:44:16 +01:00
Alexander Udalov b026de768d Do not ever run JVM test handlers after previous errors
If there's a frontend error in a test, or bytecode generation crashed
with an exception, it makes no sense to run JVM test handlers such as
lambda inlining checker or D8 checker.
2021-02-25 14:44:16 +01:00
Victor Petukhov 27846f4532 Add tests for obsolete issues (KT-42722, KT-39880) 2021-02-25 15:30:29 +03:00
Mark Punzalan 9492e75d38 FIR checker: Split checkProperty util function. 2021-02-25 13:06:53 +01:00
Mark Punzalan aad86c3892 Skip directories with lowercase "testdata" in FIR total Kotlin tests.
"idea/idea-frontend-fir/idea-fir-low-level-api/testdata" is the
affected directory.
2021-02-25 13:06:53 +01:00
Mark Punzalan 1c94372b6c FIR checker/IDE: Add checker and quickfix for VAL_WITH_SETTER. 2021-02-25 13:06:53 +01:00
Dmitriy Novozhilov 99c47a0487 Fix non-exhaustive when in common stdlib 2021-02-25 14:56:08 +03:00
Dmitriy Novozhilov 4222bb9af2 [FE] Make whens on expect sealed classes and enums not exhaustive 2021-02-25 14:56:08 +03:00
Simon Ogorodnik 1cf73203c7 [FIR-Test] Disable pre-release check in modularized tests 2021-02-25 14:03:30 +03:00
Simon Ogorodnik 2ea0e69a56 [FIR-Test] Fix incorrect file count 2021-02-25 14:03:29 +03:00
Simon Ogorodnik 0086ebe6f2 [FIR-Test] Increase code cache size 2021-02-25 14:03:28 +03:00
Simon Ogorodnik 1e73f7a5b2 [FIR-Test] Force min heap size 2021-02-25 14:03:27 +03:00
Simon Ogorodnik b6fb3c9799 [FIR] Isolate benchmark thread, add jit log format events for passes
Add special output for pass events to match with LogCompilation
2021-02-25 14:03:26 +03:00
Andrei Klunnyi 618de5fa32 KT-45074 [Sealed Interfaces]: when exhaustiveness after gradle reimport
Module descriptor names in the form of 'stableName' depend on a build
system. See JvmCodegenUtil#getModuleName(). For JPS we get
<module-name.main> or <module-name.test> whereas for Gradle we get top
level <module-name>.
This commit changes approach: ModuleDescriptor-to-Module conversion is
no longer made by name. ModuleInfo is utilized instead.

^KT-45074 fixed
2021-02-25 10:34:45 +00:00
Dmitriy Novozhilov a9c6c115be [Test] Disable gradle test parallelization if JUnit 5 is enabled 2021-02-25 10:38:45 +03:00
Dmitriy Novozhilov 2a7a20dd99 [Test] Add ability to set maximum of working threads for parallel JUnit 5 tests 2021-02-25 10:38:45 +03:00
Ilya Gorbunov ca6ce151a2 Unify test package names in kotlin-stdlib tests
This makes 'test.' an implicit package prefix, thus fixing the inspection
"Package directive doesn't match file location" positive in almost all
test files.
2021-02-25 09:58:14 +03:00
Alexander Udalov a6d8bf8127 Fix compilation of idea-fir-low-level-api 2021-02-24 21:31:19 +01:00
Alexander Udalov aeb0906f2d Build: suppress warnings for kotlin-stdlib-wasm 2021-02-24 20:48:26 +01:00
Ilya Kirillov 9ce4decb73 FIR IDE: use WhenMissingCase in NoElseInWhen diagnostic 2021-02-24 20:13:45 +01:00
Ilya Kirillov f19a9af7b3 Unify WhenMissingCase from FIR and FE1.0 2021-02-24 20:13:43 +01:00
Ilya Kirillov f4371c670e Move WhenMissingCase from fir module to compiler.common to use in IDE 2021-02-24 20:13:42 +01:00
Ilya Kirillov 83f8650e80 Move CallableId from fir module to compiler.common to use in IDE 2021-02-24 20:13:41 +01:00
Alexander Udalov 7e149a3a44 IR: remove unneeded dependencies on psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov e69cc183a4 IR: remove dependency of 'ir.tree' on 'frontend' 2021-02-24 19:07:38 +01:00
Alexander Udalov addabae8d2 IR: move frontend-dependent code into implementations in psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov d991a3e40f IR: simplify initialization cycle of TypeTranslator/ConstantValueGenerator 2021-02-24 19:07:38 +01:00