Commit Graph

3065 Commits

Author SHA1 Message Date
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
Mikhael Bogdanov 00d344d92a Update INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER message 2021-11-01 13:30:57 +01:00
Mikhael Bogdanov afc149d460 JvmDefault. Allow non default inheritance with special flag
#KT-47000
2021-11-01 13:30:57 +01:00
zhelenskiy ea10b4a781 Synchronizing by values and primitives is forbidden
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-10-29 18:50:30 +02:00
Ilya Chernikov fc176e9845 Refactor IR reporting and infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov 1e056a7aa8 Report IR errors via new diagnostic infrastructure 2021-10-27 22:17:40 +02:00
Victor Petukhov d015d3bc0e Don't enhance previously erased value parameters for jspecify strict mode
^KT-48261 Fixed
2021-10-26 19:37:55 +03:00
Denis.Zharkov 0bdea4f20a FIR: Do not create incorrect synthetic property 2021-10-26 18:45:59 +03:00
Denis.Zharkov fe1b4d61c2 Move some property convention helpers to compiler.common.jvm
Since it will be used in FIR, too
2021-10-26 18:45:58 +03:00
Mikhail Glukhikh 994c51c3e9 Fix/add message for SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC
#KT-44975 Fixed
2021-10-26 13:38:32 +03:00
Aleksei.Cherepanov 276fb77155 Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS

#KT-49177 Fixed
2021-10-20 15:06:19 +03:00
Victor Petukhov b957831683 Use WarningAwareUpperBoundChecker independently
^KT-47920 Fixed
^KT-48290 Fixed
2021-09-30 20:08:58 +03:00
Denis.Zharkov 4733a0d970 Refine naming: *TypeVariable -> *TypeParameter 2021-09-30 14:36:27 +03:00
Denis.Zharkov f7ef551f99 Report warnings on overrides with wrong types nullability
^KT-48899 Fixed
2021-09-30 14:36:26 +03:00
Victor Petukhov ee728b6902 Use the new type inference for top-level callable reference resolution
^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
2021-09-27 16:12:27 +03:00
Victor Petukhov a264cbfe7d Move CallUtil.kt under the resolve.util package 2021-09-27 16:12:01 +03:00
Victor Petukhov 1635bcad10 Move CallResolverUtil.kt under the resolve.util package 2021-09-27 16:12:00 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Denis.Zharkov 38fa900e56 FIR: Optimize case with no annotations on package 2021-09-23 16:58:26 +03:00
pyos 3a80cb1808 FIR: hide construction of JavaSymbolProvider 2021-09-14 19:00:45 +03:00
Ilya Kirillov a8d321db63 FIR IDE: do not use FE1.0 compiler jars in frontend-independent-modules 2021-09-14 14:45:43 +02:00
Ivan Kochurkin 8cdb79f969 Move JvmNames, JvmFieldApplicabilityProblem to common.jvm module 2021-09-10 00:49:10 +03:00
Ivan Kochurkin 6fa1c0353c Use deprecation type for some REPEATABLE_* diagnostics 2021-09-10 00:49:06 +03:00
Ivan Kochurkin 2baed77598 [FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Ivan Kochurkin e3805c9b98 Extract JvmNames, JvmFieldApplicabilityProblem to compiler.common 2021-09-10 00:49:01 +03:00
Dmitriy Novozhilov 0260bf8767 [FE] Move diagnostic parameter renderers to common module 2021-09-09 17:20:20 +03:00
Dmitriy Novozhilov 850ca1916f [FE] Commonize positioning strategies and move them to :frontend-psi module 2021-09-09 17:20:17 +03:00
pyos 090b90f62e FIR: load type qualifiers from module, package, and parent classes 2021-09-06 13:11:13 +03:00
Dmitriy Novozhilov d46e2dd749 Fix OVERRIDE_DEPRECATION warnings in project code 2021-09-02 15:04:07 +03:00