Commit Graph

39421 Commits

Author SHA1 Message Date
Victor Petukhov 7e491edf95 Allow empty type info for excl expressions
^KT-34515 Fixed
2022-03-24 11:46:00 +00:00
Evgeniy.Zhelenskiy b6f2513dd2 [FIR] Introduce valueClassRepresentation to FIR
#KT-1179
2022-03-24 11:38:44 +00:00
Evgeniy.Zhelenskiy 28bf83ceac [IR] Unite inline class and multi-field value class representation
#KT-1179
2022-03-24 11:38:43 +00:00
Evgeniy.Zhelenskiy 282ab398c6 [IR] Generify lowerings
#KT-1179
2022-03-24 11:38:42 +00:00
Victor Petukhov 22b2554368 [FE 1.0] Support suspend only SAM conversions
^KT-50477 Fixed
2022-03-24 09:28:28 +00:00
Steven Schäfer 1134dc3858 JVM IR: Resolve fake overrides during inline class mangling
This is necessary to determine which mangling scheme to use (KT-51672).
2022-03-24 00:38:34 +00:00
Victor Petukhov 57a134c543 [FE 1.0] Report recursive type checker problem as a warning till 1.9
^KT-48546
2022-03-23 21:13:34 +00:00
Victor Petukhov 2307122089 [FE 1.0] Report errors for recursive types from completion as well
Such diagnostics could be missed at least for plus assignment's right side because it wasn't report for the second time of analysis

^KT-48546 Fixed
2022-03-23 21:13:34 +00:00
Victor Petukhov 27fa632630 [FE 1.0] Update test data with new error type representation 2022-03-23 21:13:33 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Victor Petukhov 8c1fcddea3 [FE 1.0] Don't miss NO_SET_METHOD checks
^KT-28109 Fixed
2022-03-23 21:13:33 +00:00
Victor Petukhov 3aabc8d666 [FE 1.0] Substitute anonymous object's supertypes while using that in public declarations
^KT-46136 Fixed
2022-03-23 21:13:32 +00:00
Mikhail Glukhikh b327f5c731 Substitute type variables properly in ConeOverloadConflictResolver
#KT-46187 Fixed
2022-03-23 09:54:46 +00:00
Victor Petukhov 25a06bdc56 [Compiler CLI] Make language version description not in capital letters
^KT-51673 Fixed
2022-03-22 13:41:46 +00:00
Artem Kobzar 51bb548aef fix: remove unusedUnit_getInstance calls. 2022-03-22 10:02:21 +00:00
Mikhael Bogdanov 093b1bebb0 KAPT+IR: Generate LVT in kapt mode 2022-03-22 09:50:08 +00:00
Mikhail Glukhikh 70366c3bcb FIR: forbid java.lang.String deprecated constructors #KT-51364 Fixed 2022-03-21 13:58:13 +00:00
Artem Kobzar 6aa8c3aa2a chore: prevent the creation of unused code blocks in IR. 2022-03-21 11:26:13 +00:00
Artem Kobzar aa85b755c1 chore: remove unused break statements from inlined functions bodies. 2022-03-19 20:04:22 +00:00
Junmin Kim c7d4b97fe1 Fix typo in KFunctionProxy.kt
Replace `eqaulsByAdapteeCall` with `equalsByAdapteeCall`
2022-03-18 19:48:19 +03:00
Simon Ogorodnik 1bb655034b Inference. Add parent builder inference constraints only once 2022-03-18 12:14:00 +00:00
Simon Ogorodnik 9f6a812786 Fix multiple registration of same type variable in builder inference 2022-03-18 12:14:00 +00:00
Simon Ogorodnik 7fa13f758f Make constraint system fail hard on registering existing variable 2022-03-18 12:14:00 +00:00
Alexander Udalov ae2c4753df Fix incorrect test data on KCallable.call for inline classes 2022-03-18 12:29:05 +01:00
Alexander Udalov 8b56babb1d Fix type mapping of nullable inline class types in reflection
Based on #4761.

 #KT-31141 Fixed

Co-authored-by: wrongwrong <boranti1995@gmail.com>
2022-03-18 12:29:05 +01:00
Alexander Udalov 07ebf4ed29 Do not suppress errors with -Xsuppress-version-warnings
#KT-48833 Fixed
2022-03-18 12:28:28 +01:00
Ilya Goncharov adad0b4628 [JS IR] Fix export of nested enums
Merge-request: KT-MR-5916
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51211 fixed
2022-03-18 09:45:14 +00:00
wrongwrong a1b6c9f546 Fixed a bug where DEFAULT_CONSTRUCTOR_MARKER appeared twice as an argument
#KT-27598 Fixed

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
2022-03-17 00:54:09 +01:00
Mads Ager 0c4f2711d6 Avoid reading /tmp/build.txt in standalone compiler invocations.
^KT-51627 Fixed

kotlinc will currently read /tmp/build.txt in an attempt to
determine an IDEA version number for IDEA plugin compatibility
checking. If that file exists and does not match the expected
format kotlinc will fail.

Since standalone kotlinc is not IDEA, this change explicitly
sets the system property for the build number to a fallback
value. That avoids reading /tmp/build.txt.

closes https://github.com/JetBrains/kotlin/pull/4763
2022-03-15 18:37:01 +01:00
Jinseong Jeon a106ec6530 Do not create FastJarFileSystem when USE_PSI_CLASS_FILES_READING
because the intention of that configuration is to use "slower" class
reading.

In the near future, even though FIR is enabled, which uses experimental
faster jar file system, FIR clients (e.g., FIR UAST or Android Lint) may
still need to use slower class reading. So, we need to handle that
configuration before checking others.
2022-03-15 19:50:18 +03:00
Jinseong Jeon 6ec6def8e3 AA: reuse CoreJarFileSystem from KotlinCoreEnvironment in tests 2022-03-15 19:50:17 +03:00
Mikhail Glukhikh c051edcbee FIR: add visibility filtering for qualifier resolve #KT-51621 Fixed 2022-03-15 13:21:03 +00:00
Mikhail Glukhikh 3251c474a2 FIR: add test for KT-51621 (qualifiers conflict case) 2022-03-15 13:21:02 +00:00
Mikhail Glukhikh 901336e6e9 FIR: handle ambiguity more precisely during constructor processing 2022-03-15 13:21:02 +00:00
Mikhail Glukhikh 87a7408ddf FIR: handle double-imported qualifiers properly 2022-03-15 13:21:02 +00:00
Mikhail Glukhikh b038ae8b0c FIR: handle double-imported constructors properly 2022-03-15 13:21:01 +00:00
Mikhail Glukhikh bd790b792c FIR: minor code cleanup 2022-03-15 13:21:01 +00:00
Mikhail Glukhikh 0a7da903f4 FE1.0/FIR: add test for "double import" situation 2022-03-15 13:21:00 +00:00
Mikhail Glukhikh 5810ac01d2 FE1.0/FIR: slightly fix diagnostic messages about OptIn 2022-03-15 13:08:19 +00:00
Mikhail Glukhikh 6b53ac8367 FIR: forbid top-level destructuring declarations #KT-50468 Fixed 2022-03-15 13:08:18 +00:00
Mikhail Glukhikh 6ecc97575d FIR: make deeper recursive type alias expansion check (see KT-37000) 2022-03-15 13:08:18 +00:00
Mikhael Bogdanov 15c3dd527c KAPT+IR: Support data classes 2022-03-15 11:38:04 +01:00
Mikhael Bogdanov ceedad40f3 KAPT+IR: Support secondary constructors 2022-03-15 11:38:03 +01:00
Alexander Korepanov 69295f2cf0 [JS IR] IC invalidation refactoring
- Huge refactoring for IC
  - Update hash combination logic
  - Introduce value class for IC hashes
  - Calc md5 directly by function IR
  - Split IC logic by classes
  - Move JsIrLinkerLoader into separate file
  - CacheUpdateStatus is a sealed class
  - Render TYPE_PARAMETER reified flag

^KT-51081 Fixed
^KT-51084 Fixed
2022-03-15 05:34:19 +00:00
nataliya.valtman c38dd1c004 Fix unstable testIncrementalCompilationAfterCacheHit test 2022-03-14 20:08:14 +03:00
Ilya Goncharov 0463b5ec3c rra/ilgonmic/duplicated-import-names
[JS IR] Add tests with external funs and global vals

[JS IR] Non module cases are exceptions for naming

[JS IR] Use fqn for jsModule on declaration

[JS IR] Add test on same external names

Merge-request: KT-MR-5901
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51438 fixed
2022-03-14 14:04:27 +00:00
Ilya Chernikov 6ae55a98cd FIR2IR: fix annotations conversion for precompiled functions
fixes the case then the function being inlined is taken
from the binaries compiled on the previous iteration, and therefore
should be treated similarly to a fun from a library.
2022-03-14 13:37:50 +03:00
Ilya Chernikov aa0386276d Fix FIR incremental compilation failure with inlines and lambdas
#KT-51546 fixed
2022-03-14 13:37:50 +03:00
Yan Zhulanow 8f1a2f4612 Improve heuristic for filtering synthetic enum methods out
It's not possible to check the exact method signature, as it is
unavailable in dumb stubs for Kotlin's light classes. Yet, it's still
possible to check more things, such as parameter count and access flags.
2022-03-14 17:53:55 +09:00
Yan Zhulanow c334a44e02 Preserve synthetic enum methods in stub-based 'ClsClassImpl'
'ClsClassImpl' instances created by the platform contain synthetic
enum methods (added by 'ClassInnerStuffCache.calcMethods()'). Such
convention is common in IntelliJ (see KT-36095 and
'9a8b345adaded83fe13980a28db5d9f9acc7450d' in the IntelliJ repository).

This commit makes Kotlin's stub-based classes consistent with the
convention. Instead, a filter is added in place of 'ClsClassImpl' usage.

See also the following commits:
- 7c86911f44
- 43468c6d55
2022-03-14 17:53:55 +09:00