Commit Graph

3093 Commits

Author SHA1 Message Date
Dmitriy Novozhilov af8caae387 [KAPT] Fix formatting 2022-07-20 10:12:25 +00:00
Dmitry Gridin 52e0e744af move JvmFileClassInfo and JvmFileClassUtil to frontend.common.jvm
^KT-53097
2022-07-19 15:41:43 +00:00
Dmitry Gridin 4250d2ac23 move PackagePartClassUtils to frontend.common-psi
^KT-53097
2022-07-19 15:41:40 +00:00
Dmitry Gridin 31b89757f7 [light classes] move JvmDeclarationOriginKind to frontend.common.jvm module
^KT-53097
2022-07-19 15:41:24 +00:00
Pavel Mikhailovskii 846537b367 KT-45375 Lightweight lambdas; KT-52817 introduce @JvmSerializableLambda 2022-07-18 17:10:07 +02:00
Victor Petukhov fb21937eb1 [FE 1.0] Report INVISIBLE_MEMBER on all qualified expressions including safe call ones
^KT-47621 Fixed
2022-07-11 12:44:06 +00:00
Zac Sweers 3896482e4f Fix wrong replacement name for Enum.declaringClass
Resolves https://youtrack.jetbrains.com/issue/KT-52718
2022-06-10 13:53:03 +00:00
Ivan Kylchik 73a571ef7f Report warning from backend if constant expression cannot be evaluated 2022-05-18 21:20:04 +03:00
Ivan Kylchik 40d224d5fe Change error message of EXCEPTION_IN_CONST_VAL_INITIALIZER 2022-05-18 21:20:03 +03:00
Ivan Kylchik 1431d4b356 Add jvm diagnostic tests to check report of exceptions from interpreter 2022-05-18 21:20:00 +03:00
Vladimir Dolzhenko efd5beb49b IJ file type optimizations based on extension
#KTIJ-21668

Merge-request: KT-MR-6288
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2022-05-17 14:46:00 +00:00
pyos effd21d074 JVM_IR: do not optimize suspend$$forInline functions
`$$forInline` functions do not pass through the state machine generator,
and optimizing `Ref`s before that changes how assignments inside lambdas
passed to `suspendCoroutine`, etc. behave: without a `Ref`, the
assignment is not reflected in the continuation object, so the variable
has old value on resumption.

These functions will be optimized later, after they are inlined
somewhere and the state machine is generated.

^KT-52198 Fixed
2022-05-02 20:18:08 +02:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Denis.Zharkov 9c7fea24d1 Fix exception when reporting WRONG_TYPE_PARAMETER_NULLABILITY_FOR_JAVA_OVERRIDE
^KT-51979 Fixed
2022-04-15 12:36:05 +00:00
Ilmir Usmanov 6e30ce2763 FE: Make synchronized suspend functions and lambdas error in 1.8
#KT-27333 Fixed
2022-04-11 12:02:30 +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
Vladimir Dolzhenko 289b838d77 [kotlin] Optimize file.fileType calculation
#KTIJ-20095
2022-01-31 08:31:33 +00:00
Mikhail Glukhikh fd3d86eddf FE 1.0: introduce deprecation for Enum.declaringClass (KT-49653) 2022-01-27 17:27:40 +03:00
Denis.Zharkov b2543b7a26 Fix false negative UPPER_BOUND_VIOLATED with typealiases in supertypes
^KT-50797 Fixed
^KT-50798 Open
2022-01-19 09:52:16 +03:00
Mikhail Glukhikh a4f74f60d9 Fix apostrophes in error messages #KT-50183 Fixed 2022-01-14 22:20:23 +03:00
Evgeniy.Zhelenskiy df1de3a7d3 [JVM] Forbid non-JvmInline value classes again 2022-01-14 13:51:56 +00:00
Mikhael Bogdanov 92e893bebe Rework Tune module graph dependencies building
#KT-50701 In progress
2022-01-14 11:22:46 +00:00
Denis.Zharkov d87eddaf8b Improve warnings related to type parameter bounds nullability
Explicitly supply the type parameter that needs to be non-nullified

^KT-36770 Relates
2022-01-13 08:47:20 +03:00
Irene Dea 19bfc43bee Fixes and refactors 2022-01-08 15:25:07 +03:00
Ilya Kirillov 52baf7338e Move KotlinBinaryClassCache to separate module, so it can be used outside FE1.0 2021-12-27 16:23:08 +03:00
Mikhael Bogdanov e5e3e9d326 Advanced modules supports
#KT-29974
2021-12-23 07:25:58 +00:00
Mikhael Bogdanov ae81aaa7b0 Tune module graph dependencies building 2021-12-23 07:25:57 +00:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Ilya Chernikov c1c94778ce Detect and report inner classes capturing script instance 2021-12-14 13:39:22 +03:00
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Evgeniy.Zhelenskiy 96334948f0 [Tests] Pass sample test without annotation with flag ValueClasses 2021-12-10 18:19:15 +03:00
Mikhael Bogdanov 7e99ba30f3 Remove obsolete USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL diagnostic
#KT-47000
2021-12-09 11:30:06 +01:00
Dmitry Petrov 50b0dae786 KT-47939 fixes after review 2021-12-08 14:12:37 +03:00
Dmitry Petrov 1fd0dec5e7 FE KT-47939 callable references to functional interface constructors
Allow callable references to Kotlin 'fun interface' constructors.
Prohibit callable references to Java SAM interface constructors.
2021-12-08 14:12:33 +03:00
Dmitry Petrov bfb6e73728 Minor: reformat Errors.java & ErrorsJvm.java 2021-12-08 14:12:32 +03:00
Leonid Startsev 767c570af4 Load default values for annotation members from classfiles
so that defaults are available to synthetic implementations.

#KT-48181 Fixed

Implementation is for JVM IR; other backends & FIR need to be supported
separately.
2021-12-07 10:10:04 +00:00
Mikhael Bogdanov a2395ec8bb Additional diagnostics for @JvmDefaultWithCompatibility 2021-12-06 14:20:25 +01:00
Mikhael Bogdanov ea58c858d1 JvmDefault. Support @JvmDefaultWithCompatibility annotation
#KT-48217 Fixed
2021-12-06 14:20:24 +01:00
Mikhael Bogdanov c0ffbe03c6 Remove '-Xjvm-default-allow-non-default-inheritance' flag. Enable such inheritance by default
#KT-47000 Fixed
2021-12-03 06:39:38 +01:00
Anastasiya Shadrina a2403c470f [BE] Put context receivers before an extension receiver 2021-12-02 20:24:00 +03:00
Anastasiya Shadrina a39fbd3822 [FE] Add getContextReceivers to CallableDescriptor interface 2021-12-02 20:23:17 +03:00
Hung Nguyen 6bee7948e7 KT-45777: Don't compute snapshots for inaccessible classes
Also visit a class file with ASM once to extract all information we need
in advance, instead of visiting the class file each time some piece of
info is needed.
2021-11-30 13:59:14 +03:00
Mikhail Glukhikh d16b5c8bd8 FE: make error message more precise #KT-49598 Fixed 2021-11-28 11:32:11 +03:00
Mikhail Glukhikh 0290ca07af FE: fix some error messages (filed -> field)
#KT-49600 Fixed
2021-11-28 11:32:10 +03:00
Victor Petukhov c2de8712f2 Don't store strong references on thread local cache and clean-up request caches properly
^KT-46744 Fixed
2021-11-22 10:43:22 +03:00
Dmitriy Novozhilov 93378b1a04 [FE 1.0] Resolve private constructors of sealed classes same as for regular classes
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Alexander Udalov 850d76f6bf Remove error on annotated types as arguments to typeOf
Instead, document that `KType.annotations` returns an empty list for
types created with `typeOf`. Annotations might be supported in the
future.

 #KT-49573 Fixed
 #KT-29919
2021-11-16 15:02:50 +01:00
Igor Yakovlev ee7f4c7278 [WASM] Implementation typeOf support 2021-11-15 19:53:48 +03:00
Tianyu Geng 8ba2e4d221 FIR: move JavaAnnotationMapper.javaToKotlinNameMap to common
so that FIR IDE logic can reference it
2021-11-04 20:52:50 +01:00
Mikhael Bogdanov 2258e26799 Fix INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER diagnostic in IDE 2021-11-01 13:30:58 +01:00