Commit Graph

718 Commits

Author SHA1 Message Date
Victor Petukhov 5508d40371 Put using underscored type arguments under a feature 2021-11-01 12:25:45 +03:00
Artem Kobzar 979e9f94ef feat(Escaped Identifiers): add ability to use any symbol wrapped in back ticks. 2021-10-29 17:55:59 +00:00
Dmitriy Novozhilov 58889a2b5c [FE 1.0] Prohibit access to members of companion of enum from enum entry initializer
^KT-49461 Fixed
^KT-49110
2021-10-29 18:45:19 +03:00
Mikhail Glukhikh 8bd0b237b7 Convert EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR into deprecation error
#KT-28078 Fixed
2021-10-27 19:43:01 +03:00
Victor Petukhov 34fb61fb3e Postpone promoting warnings to errors for ProperTypeInferenceConstraintsProcessing
^KT-49322 Fixed
2021-10-26 19:38:00 +03: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
Dmitriy Novozhilov 9e5f03dd7d [FE] Change version of ProhibitConfusingSyntaxInWhenBranches to 1.8
^KT-48385
2021-10-25 12:54:21 +03:00
Dmitriy Novozhilov f7bb55433d Add LanguageVersion and ApiVersion for 1.8 2021-10-25 12:54:10 +03:00
Dmitriy Novozhilov a2b8493f47 [FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression
^KT-44705
^KT-49349 Fixed
2021-10-21 19:39:51 +03:00
Dmitriy Novozhilov 1513e739c6 [FE 1.0] Prohibit confusing syntax inside when branches
^KT-48385 Fixed
2021-10-21 19:39:36 +03:00
Ilmir Usmanov 3f8fa3149b Support extensions in functional supertypes
Under a flag for now.
2021-10-18 18:53:26 +03:00
Mikhail Glukhikh 9a5058849e Delay ExtensionPropertyTypeParameterInDelegate forbiddance to 1.7
Related to KT-24643
2021-10-11 13:04:39 +03:00
Dmitry Petrov 146f0f4904 JVM_IR KT-41214 emit PermittedSubclasses on JDK17+ 2021-10-09 17:07:35 +03:00
Victor Petukhov d9c50f0fda Report NON_VARARG_SPREAD on missed cases
^KT-48162 Fixed
2021-09-30 20:08:56 +03:00
Victor Petukhov e30d467304 Implement deprecation cycle for proper refinement rhs type in assignments for java fields
^KT-46727 Fixed
2021-09-30 20:08:54 +03:00
Victor Petukhov 561ef5947a Introduce error for PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE
^KT-42972 Fixed
2021-09-30 20:08:37 +03:00
Victor Petukhov 01e853fb9b Introduce error for SUPER_CALL_FROM_PUBLIC_INLINE
^KT-45378 Fixed
2021-09-30 20:08:36 +03:00
Ilya Gorbunov ec5c06238d Split language and api version lifetimes, restore apiVersion 1.3 support
KT-49007
2021-09-29 21:46:53 +03:00
Dmitriy Novozhilov 7917e511ed [FE 1.0] Disable INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning by default
Also remove sinceVersion parameter from
  ApproximateIntegerLiteralTypesInReceiverPosition language feature

^KT-48992 Fixed
2021-09-29 21:23:22 +03:00
Mikhail Glukhikh 363680e4c9 Delay abstract class member forbiddance (see KT-45508) to 1.7 2021-09-28 11:17:42 +03:00
Dmitriy Novozhilov 4f7103b2a1 Add ApiVersion for 1.7 2021-09-28 10:16:51 +03:00
Nikolay Lunyak 7921e64540 [FIX] Add the ExplicitBackingFields language feature 2021-09-17 14:36:39 +03:00
Victor Petukhov ce02cd4729 Enable suspend conversions by default in 1.6
^KT-48618 Fixed
2021-09-08 13:09:20 +03:00
Mikhail Glukhikh 17590b7114 Disable OptInOnOverrideFordidden feature #KT-48535 Fixed 2021-09-03 15:40:44 +03:00
Dmitriy Novozhilov ef9ad5af51 [FE 1.0] Report warning on non-deprecated overrides of deprecated members
Also don't propagate deprecation status to overrides after 1.7

^KT-47902 Fixed
2021-09-02 15:04:07 +03:00
Dmitriy Novozhilov 8117cd4c24 Postpone ApproximateIntegerLiteralTypesInReceiverPosition feature till 1.7
^KT-38895
2021-09-02 13:34:29 +03:00
Dmitriy Novozhilov 1e0878cde0 [FE 1.0] Postpone SafeCallsAreAlwaysNullable till 1.7
^KT-46860 Fixed
2021-09-02 13:34:27 +03:00
Dmitriy Novozhilov 5a5d25d350 [FE 1.0] Postpone ProhibitSimplificationOfNonTrivialConstBooleanExpressions till 1.7
^KT-39883
2021-09-02 13:34:25 +03:00
Denis.Zharkov 4a9d4ed9fe Enable ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated since 1.7
^KT-36770 Fixed
2021-08-31 15:41:17 +03:00
Denis.Zharkov d91155558b Rename LF: DefinitelyNotNullTypeParameters -> DefinitelyNonNullableTypes 2021-08-31 15:41:17 +03:00
Denis.Zharkov 9e6af52e1f Enable DefinitelyNotNullTypeParameters since 1.7
^KT-26245 In Progress
2021-08-31 15:41:13 +03:00
Svyatoslav Scherbina d4a8c51637 Native: report a warning on invalid characters in identifiers
This will become an error in Kotlin 1.7.

^KT-46182 Fixed
2021-08-31 08:50:14 +00:00
Alexander Udalov 4f29c113b7 Remove KotlinCompilerVersion.IS_PRE_RELEASE
Now, milestones of major Kotlin releases (e.g. 1.6.0-M1) will NOT
generate prerelease binaries anymore.

The reason for that is it's proven to be quite a complicated process to
turn on IR_PRE_RELEASE after the release is branched, perform double
bootstrap and fix tests, and then do it again in reverse just before
release. With the new release cadence, we don't have that much time to
do it and verify that everything works as intended.

Note that this only removes the "global" prerelease flag. Compiler will
still generate prerelease binaries if a non-stable language version is
used. For example, Kotlin 1.6.0-M1 with `-language-version 1.7` will
generate prerelease binaries.
2021-08-24 16:23:42 +02:00
Mikhail Glukhikh 12726bde15 Deprecate smart cast on alien derived property #KT-48101 Fixed 2021-08-24 12:32:30 +03:00
Victor Petukhov bf1e68a53f Resolve calls using the builder inference despite the presence of the annotation if there are uninferred type variables
^KT-48194 Fixed
2021-08-20 01:28:11 +03:00
Victor Petukhov 55811c8851 Don't use builder inference if possible
The builder inference is running only if there are still uninferred type variables

^KT-48193 Fixed
2021-08-20 01:28:10 +03:00
Dmitriy Dolovov af12d61388 [IR] Enhance error reporting for IR linking issues
^KT-44626

Support correct error reporting both with native static caches and without native static caches.
2021-08-17 07:53:45 +00:00
Dmitriy Dolovov ac387b1f26 [Gradle, Native] Pass external dependencies to Kotlin/Native link tasks
^KT-44626
2021-08-10 14:02:27 +03:00
Alexander Udalov e20b354dbd Check repeatable annotation container parameters, retention, target
#KT-12794
 #KT-47928
2021-07-30 19:53:33 +02:00
Alexander Udalov f723389565 Remove mapping of java.Repeatable to kotlin.Repeatable in JavaAnnotationMapper
The main motivation for this change is that
java.lang.annotation.Repeatable has a parameter for the container
annotation, which is lost during conversion to
kotlin.annotation.Repeatable. To support j.l.a.Repeatable in backend
properly, it's absolutely necessary to be able to load the container
annotation for any repeatable annotation class, so the original
j.l.a.Repeatable needs to be stored in the descriptor and accessible
from the backend.

Instead of mapping j.l.a.Repeatable -> k.a.Repeatable, add a frontend
service PlatformAnnotationFeaturesSupport that will determine if an
annotation is repeatable "according to the platform rules", which for
JVM means that it's annotated with j.l.a.Repeatable.

Some effects of this change include:
- Usages of j.l.a.Repeatable are no longer reported as "deprecated", the
  corresponding test is deleted
- Usages of repeatable annotations declared in Java with non-SOURCE
  retention with LV 1.5 and earlier will now result in a slightly
  different error (REPEATED_ANNOTATION instead of
  NON_SOURCE_REPEATED_ANNOTATION)

 #KT-12794
2021-07-30 19:53:32 +02:00
Mikhael Bogdanov ee07ff7982 Switch latest stable version to 1.6 2021-07-29 19:45:53 +02:00
Dmitriy Novozhilov 2c9857b880 Assume LV 1.6 ready for preview
^KTIJ-19253 Fixed
2021-07-29 13:28:15 +03:00
Mikhail Glukhikh 84bd347841 Make EXPERIMENTAL_API_USAGE_ERR warning till 1.6 for signature type case 2021-07-27 14:58:56 +03:00
Mikhail Glukhikh 810def829c Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warning till 1.6 2021-07-27 14:58:55 +03:00
Mikhail Glukhikh bb38eaae61 Postpone OptIn release to version 1.7 2021-07-27 14:56:54 +03:00
Leonid Startsev 83c1a75c1e Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""
Fix incorrectly rebased ce0a3a57df

This reverts commit 3d0126d5
2021-07-21 18:24:07 +03:00
Dmitriy Novozhilov a710a8d10f [FE 1.0] Report warning on non-exhaustive when statements only after 1.6
^KT-47709
2021-07-21 17:53:05 +03:00
Leonid Startsev 3d0126d5dd Revert "Instantiation of annotations for JVM IR with the corresponding feature flag"
because of incorrect rebase

This reverts commit ce0a3a57
2021-07-21 15:23:24 +03:00
Leonid Startsev ce0a3a57df Instantiation of annotations for JVM IR with the corresponding feature flag
Seperate checker for platforms that do not support this language feature yet

Synthetic implementations of annotations are generated on-demand with proper 
equals, hashCode, and annotationType methods

#KT-47699 Fixed
2021-07-21 10:23:51 +00:00
Dmitriy Novozhilov ef635f6a96 [FE 1.0] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types
^KT-47709 In Progress
2021-07-20 13:33:43 +03:00