Denis.Zharkov
5a8dc00a0d
Rename JvmBuiltInsSettings -> JvmBuiltInsCustomizer
2020-12-24 14:06:19 +03:00
Victor Petukhov
9a52863fbd
Report warnings about type mismatches based on freshly supported nullability annotations deeply
2020-12-18 19:32:05 +03:00
Victor Petukhov
9693ea19fb
Add tests for type enhancement uncluding with compiled java
2020-12-18 19:32:05 +03:00
Victor Petukhov
6f8f531d87
Put type enhancement improvements under the compiler flag
2020-12-18 19:32:05 +03:00
Simon Ogorodnik
9bf2dfaa02
KT-40200: Fix main function detector in lazy resolve overload resolver
2020-12-18 14:19:56 +03:00
Victor Petukhov
d32d0a65f0
Revert "Report warning on @JvmStatic in private companion objects"
...
This reverts commit 9669ab14
2020-12-16 10:24:18 +03:00
Victor Petukhov
94deddef7f
Revert "Minor: cover negative cases with test +m"
...
This reverts commit 04a4f9cd
2020-12-16 10:24:12 +03:00
Andrei Klunnyi
3af0257b38
KTIJ-664 [SealedClassInheritorsProvider]: IDE-specific implementation
2020-12-15 18:43:00 +01:00
Denis.Zharkov
5aaaa3881d
Refine diagnostic text for NULLABLE_TYPE_PARAMETER_AGAINST_NOT_NULL_TYPE_PARAMETER
...
^KT-43225 Fixed
2020-12-11 14:22:40 +03:00
Dmitriy Novozhilov
1c9f9130e6
[FE] Prohibit implementing java sealed classes
2020-12-09 22:54:32 +03:00
Denis.Zharkov
92b402759b
Report incorrect JVM target only when @JvmRecord is actually used
2020-12-09 16:47:25 +03:00
Denis.Zharkov
3aa55620d0
Prohibit explicit j.l.Record supertype even for @JvmRecord
2020-12-09 16:47:25 +03:00
Denis.Zharkov
ddbd62054f
Prohibit extending java.lang.Record from non-@JvmRecord classes
2020-12-09 16:47:23 +03:00
Denis.Zharkov
695d0dbfbb
Check JvmRecordSupport language feature before generating synthetic properties
2020-12-09 16:47:23 +03:00
Denis.Zharkov
b860a0c664
Separate JvmTarget::bytecodeVersion version into major/minor parts
2020-12-09 16:47:22 +03:00
Denis.Zharkov
c8851c4f75
Prohibit @JvmRecord for non-data classes
...
^KT-43677 In Progress
2020-12-09 16:47:22 +03:00
Denis.Zharkov
033f43794d
Prohibit irrelevant fields in @JvmRecord classes
...
^KT-43677 In Progress
2020-12-09 16:47:22 +03:00
Denis.Zharkov
f6a3580c93
Add @JvmRecord diagnostics for open and enums
...
^KT-43677 In Progress
2020-12-09 16:29:04 +03:00
Denis.Zharkov
bef50c0342
Correct descriptor shape for @JvmRecord annotated classes
...
This commit adds relevant functions: hashCode, toString, equals
(if the class is not a data class)
And supertype j.l.Record
It only affects descriptor contents, i.e. works for FE
^KT-43677 In Progress
2020-12-09 16:29:04 +03:00
Denis.Zharkov
d4de2c4dce
Add check that we have JDK 15 in classpath when using @JvmRecord
...
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Denis.Zharkov
85962d8312
Add check that @JvmRecord classes cannot inherit other classes
...
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Denis.Zharkov
4f5db241ea
Add @JvmRecord annotation and relevant diagnostics
...
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Denis.Zharkov
513f7177ca
Support loading Java records
...
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Ilmir Usmanov
78e607c6b0
Value classes: Support @JvmName annotation on functions with inline
...
classes in signatures, but not on methods of inline classes.
2020-11-28 00:34:04 +01:00
Ilmir Usmanov
ca3e7cf1a7
Value classes: Report lacking @JvmInline only on JVM backend
...
Report when @JvmInline is applied on non-value class.
2020-11-27 23:52:07 +01:00
Dmitry Petrov
3a166f3592
KT-43525 forbid @JvmOverloads on mangled funs and hidden constructors
2020-11-24 16:06:20 +03:00
Steven Schäfer
4e03b1e05f
JVM: Allow the JvmSynthetic annotation on file classes (KT-41884)
2020-11-17 22:06:19 +01:00
Mikhail Zarechenskiy
bb2e9e2d56
Extract new method from the publicly used interface for compatibility
...
Note that we can't just use ``@JvmDefault` annotation as the main change
is in the `core` module which targets Java 6
#KT-42259 Fixed
2020-10-27 14:14:39 +03:00
Pavel Kirpichenkov
04a4f9cde6
Minor: cover negative cases with test +m
...
Add case without reported diagnostic on public companion.
Only report diagnostic if @JvmStatic annotation has source in code.
KT-25114
2020-10-16 11:11:59 +03:00
Pavel Kirpichenkov
9669ab1468
Report warning on @JvmStatic in private companion objects
...
Deprecation cycle to prohibit in 1.5.
^KT-25114 In Progress
2020-10-16 11:11:59 +03:00
Mikhael Bogdanov
c8e84f82eb
Proper check NON_JVM_DEFAULT_OVERRIDES_JAVA_DEFAULT in new jvm-default modes
...
#KT-42699 Fixed
2020-10-15 16:26:00 +02:00
Mikhael Bogdanov
b6dc99b98e
Skip java defaults in EXPLICIT_OVERRIDE_REQUIRED_IN_MIXED_MODE check
...
#KT-42674 Fixed
2020-10-15 16:26:00 +02:00
Mikhail Zarechenskiy
eacc94a89d
Do not hide synthetic properties except isEmpty from Java
...
In order to hide synthetic property isEmpty from JDK 15, there was
added additional logic in 5cc12b49fc but
it also lead to the fact that now it's impossible to call synthetic
property `declaringClass` on `Enum` as it's in the same list as method
isEmpty(). Note that it's questionable behavior, probably we should
also hide `declaringClass` as well but for now we turn it back to
preserve compatibility
#KT-42467 Fixed
2020-10-15 12:26:17 +03:00
Denis Zharkov
c734bac676
Minor. Reformat JavaNullabilityChecker.kt
2020-10-08 14:00:08 +03:00
Denis Zharkov
90a9ca6cb3
Minor. Rename flag in JvmAnalysisFlags: jsr305 -> javaTypeEnhancementState
2020-10-08 14:00:08 +03:00
Denis Zharkov
5cc12b49fc
Hide java.lang.CharSequence::isEmpty from Kotlin built-in class
...
Also, prohibit using it as a synthetic property
^KT-42467 In progress
2020-10-07 17:48:19 +03:00
Mikhael Bogdanov
5048471835
Properly check default kind on inheriting from old DefaultImpls scheme
2020-10-06 18:10:44 +02:00
Mikhael Bogdanov
b27955d268
Wrong specialization diagnostic is reported on java default inheritance
2020-10-05 20:09:21 +02:00
Victor Petukhov
fcfabb70d5
Report invisible setter error if it's resolved to synthetic property of base class with public getter and protected setter
...
^KT-11713 Fixed
2020-09-30 14:35:43 +03:00
Denis Zharkov
fdd71c0bce
Fix incorrect NULLABLE_TYPE_PARAMETER_AGAINST_NOT_NULL_TYPE_PARAMETER
...
^KT-42257 Fixed
2020-09-30 14:10:53 +03:00
Vladimir Dolzhenko
3c380faeb5
Added deprecated PackageFragmentProvider#getPackageFragments for BWC
...
Relates to ^KT-33394
^KT-42259 Fixed
2020-09-29 19:14:44 +00:00
Dmitriy Novozhilov
7380abac13
Split AsmUtils to descriptors dependent and independent parts
2020-09-24 16:51:05 +03:00
Igor Yakovlev
4b8f1bb362
[ULC] Add LanguageVersionSettings to CliLightClassGenerationSupport
...
+ refactoring
2020-09-11 12:49:04 +03:00
Vladimir Dolzhenko
5036673187
Improve package caching in KotlinJavaPsiFacade
...
^KT-33394 Fixed
2020-09-10 07:38:46 +00:00
Vladimir Ilmov
a5d91339b5
(lightClass) multifile classes facade in libraries added
...
relates to #KT-39196
2020-09-09 15:01:54 +02:00
Vladimir Ilmov
60dfa8cc84
Ignore ProcessCancelledException in VirtualFileKotlinClass
2020-09-07 12:17:06 +02:00
Dmitriy Novozhilov
6906e0d82d
Move common jvm classes from :core:descriptors.jvm to :core:compiler.common.jvm
2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov
b81c0e91d5
Replace DescriptorVisibility with Visibility in Java model classes
2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov
696f089b3e
Make DescriptorVisibility delegate to Visibility
2020-09-04 11:42:50 +03:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00