Commit Graph

10518 Commits

Author SHA1 Message Date
Tianyu Geng f217bb94de Use more consistent names for inheritors of BooleanIsMissing 2021-11-04 23:04:35 +01:00
Tianyu Geng 7de0937031 FIR IDE: get unstable smartcast from FE1.0-based analysis API
Note that the current FE1.0 implementation still has some limitations

1. only references used as receiver are being considered for smartcast.
2. Somehow the smartcast information is not retained if the for generic
typed receivers. See multiSmartcastAsReceiver_stable.descriptors.txt
2021-11-04 16:00:37 +01:00
Victor Petukhov d1acb09add Report unsupported on using underscored type argument if the corresponding feature is disabled 2021-11-01 13:03:40 +03:00
Victor Petukhov 5508d40371 Put using underscored type arguments under a feature 2021-11-01 12:25:45 +03:00
Victor Petukhov 1073adbbf0 Report unsupported errors on annotations on underscored type arguments 2021-11-01 12:25:14 +03:00
Victor Petukhov 248c9550cd Support type annotations resolution on an underscored type argument 2021-11-01 12:25:10 +03:00
Victor Petukhov b69fb6779f Basic support of partially specified type arguments though a new underscore operator for type arguments
^KT-13394
2021-11-01 12:25:07 +03:00
Dmitriy Novozhilov 275a8a7a36 [FE 1.0] Fix message for UNINITIALIZED_ENUM_COMPANION_WARNING\
^KT-49110
2021-10-30 13:43:12 +03:00
Dmitriy Novozhilov 2956b8b307 [FE 1.0] Fix commit message of UNNECESSARY_SAFE_CALL warning
^KT-46860
2021-10-30 13:41:24 +03: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
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 9f062df258 FE: fix factory and message for EXPOSED_FROM_PRIVATE_IN_FILE
#KT-49442 Fixed
2021-10-28 16:24:43 +03:00
Sergej Jaskiewicz a367b91aa1 [IR] [Refactoring] Add toString and String::plus to IrBuiltins
Also use `OperatorNameConventions` constants instead of magic strings
2021-10-28 08:35:11 +00:00
Ilya Chernikov 932eab8dfc Implement semi-lazy PSI-based suppress cache for IR
calculates suppressions per root (KtFile) basis on demand.
2021-10-27 22:17:42 +02:00
Ilya Chernikov bfe31c97ac Add support for ASTs without parents to suppress cache 2021-10-27 22:17:42 +02:00
Ilya Chernikov 7ef806b2ed Extract AbstractKotlinSuppressCache to frontend.common 2021-10-27 22:17:42 +02:00
Ilya Chernikov 70259cc228 Extract psi- and descriptior-independent suppress cache logic 2021-10-27 22:17:41 +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
Ilya Chernikov e9f59e8d1d Move common diagnostics infrastructure to frontend.common 2021-10-27 22:17:39 +02:00
Mikhail Glukhikh 8bd0b237b7 Convert EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR into deprecation error
#KT-28078 Fixed
2021-10-27 19:43:01 +03:00
Dmitriy Novozhilov f26059a7d3 [FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
^KT-46860
2021-10-27 16:28:37 +03:00
Victor Petukhov 02d06b6390 Transform VisibilityError diagnostic for callable references to further report it on the corresponding argument of a base call
^KT-46437 Fixed
2021-10-26 19:37:57 +03:00
Victor Petukhov d50eba62bd Propagate inference session from local context into property resolvers
^KT-48633 Fixed
2021-10-26 19:37:56 +03:00
Mikhail Glukhikh 5deb96f679 Fix RENDER_CLASS_OR_OBJECT renderer for interface case #KT-38698 Fixed 2021-10-26 13:38:35 +03:00
Mikhail Glukhikh 9da7a24915 Fix error message for OPT_IN_IS_NOT_ENABLED #KT-45001 Fixed 2021-10-26 13:38:34 +03:00
Ivan Kochurkin c13822a2c5 Optimize containsKey -> get pattern 2021-10-25 21:21:44 +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 06a26a5a74 [FE 1.0/FIR] Fix message of SEALED_SUPERTYPE_IN_LOCAL_CLASS diagnostic
^KT-46285 Fixed
2021-10-21 19:39:49 +03:00
Dmitriy Novozhilov f52361ac2b [FE 1.0] Properly report NON_TRIVIAL_BOOLEAN_CONSTANT on parenthesized expressions
^KT-39883
2021-10-21 19:39:39 +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
Yan Zhulanow 516dd825c2 [FIR IDE] Initial descriptor-based implementation of the Analysis API 2021-10-20 19:41:24 +03:00
Ilmir Usmanov 2b8963455f Use a separate diagnostic for 'suspend fun' sequence
instead of reusing existing one, since existing one
is ERROR, and we cannot turn code red without deprecating
it with WARNING.
 #KT-49264
2021-10-20 18:12:10 +02: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
Mikhail Glukhikh 931779f1c6 Fix OPT_IN_IS_NO_ENABLED message (see KT-48534) 2021-10-20 12:17:12 +03:00
Vladimir Dolzhenko 714773fdf8 Add DiagnosticSink.setCallbackIfNotSet and deprecate DiagnosticSink.setCallback
#EA-258953 Fixed
2021-10-18 21:38:48 +03:00
Ilmir Usmanov 3f8fa3149b Support extensions in functional supertypes
Under a flag for now.
2021-10-18 18:53:26 +03:00
Roman Golyshev 10101dc2b4 Add more accurate docs to the ResolvedCall 2021-10-18 17:03:09 +03:00
Abduqodiri Qurbonzoda f0a75e7843 Advance deprecation level of Experimental and UseExperimental annotations to ERROR 2021-10-17 21:14:36 +00:00
Irene Dea 78ee6b2a09 Extend CandidateInterceptor to intercept ResolvedCallAtom candidate 2021-10-14 18:32:03 +03:00
Ilmir Usmanov 559d7015f7 Extend NON_MODIFIER_FORM_FOR_BUILT_IN_SUSPEND diagnostic
to include "suspend fun" token sequence as well
2021-10-14 12:44:18 +00:00
Ilya Muradyan 58831eacca [scripting] Make properties from destructing declarations available with reflection 2021-10-07 18:17:21 +03:00
Victor Petukhov 6ee1599efa Provide proxy for deprecated org.jetbrains.kotlin.resolve.calls.callUtil.getValueArgumentForExpression 2021-10-04 15:01:09 +03:00
Victor Petukhov 23f6c29efc Provide some additional proxies for external use of deprecate package org.jetbrains.kotlin.resolve.calls.callUtil
Provided API is `getCalleeExpressionIfAny` and `createLookupLocation`
2021-10-01 19:29:44 +03:00
Victor Petukhov 43a83dd07a Don't add LHS type constraint for callable references too early, before the resolution
The constraint depends on a resolution candidate, because it can be Java static or companion object's member (don't need add constraint in this case)

^KT-41978 Fixed
2021-10-01 13:33:21 +03:00
Victor Petukhov b5661ccabd Don't run contract-specific checks in propery scopes
^KT-45118 Fixed
2021-09-30 20:08:59 +03:00
Victor Petukhov b957831683 Use WarningAwareUpperBoundChecker independently
^KT-47920 Fixed
^KT-48290 Fixed
2021-09-30 20:08:58 +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 71ceffefb5 Support reporting deprecation errors explicitly 2021-09-30 20:08:55 +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