Abduqodiri Qurbonzoda
d28d0a6321
Advance String(CharArray) deprecation level to ERROR in Common and JS
2021-04-07 00:23:29 +03:00
Abduqodiri Qurbonzoda
968099fbec
Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360
2021-04-07 00:23:20 +03:00
Ivan Kochurkin
404c69ded7
[FIR] Implement INCORRECT_CHARACTER_LITERAL, EMPTY_CHARACTER_LITERAL, TOO_MANY_CHARACTERS_IN_CHARACTER_LITERAL, ILLEGAL_ESCAPE, ILLEGAL_ESCAPE_SEQUENCE diagnostics, fix tests
2021-04-06 20:44:32 +03:00
Abduqodiri Qurbonzoda
e8992c5d19
Advance deprecation level of InputStream.readBytes(estimatedSize) to ERROR
2021-04-06 18:42:53 +03:00
Ilya Gorbunov
81f2aea316
Stabilize existing Path API and annotate with @Throws where appropriate
...
KT-45913
2021-04-06 14:24:42 +03:00
Dmitriy Novozhilov
3ef87d0265
[FIR] Add effective visibility to resolved status
...
This commit includes:
- introduce FirResolvedDeclarationStatus.effectiveVisibility
- replace FirEffectiveVisibility with EffectiveVisibility
- move calculation of effective visibility from FirEffectiveVisibilityResolver
(which is deleted) to FirStatusResolver and FirDeserializer
2021-04-06 12:30:46 +03:00
Dmitriy Novozhilov
a600d18396
[FIR] Resolve statuses of all classes on path in FirDesignatedStatusResolveTransformer
...
This is required for calculating of effective visibility, because it
depends on effective visibility of outer class (those changes are
added in next commit)
Also fix incorrect designation building for local classes
2021-04-06 12:30:45 +03:00
Dmitriy Novozhilov
d7cd9e4c44
[FIR] Cleanup FirStatusTransformerExtension
2021-04-06 12:30:43 +03:00
Dmitriy Novozhilov
66668b2294
[FIR] Support resolve of local typealiases
2021-04-06 12:30:42 +03:00
Dmitriy Novozhilov
3cb17ac2f0
[FIR] Implement FirReturnAllowedChecker
...
Supported diagnostics:
- RETURN_NOT_ALLOWED
- RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY
2021-04-06 12:30:41 +03:00
Dmitriy Novozhilov
254ff77977
[FIR] Fix creating source for return expressions in light tree fir builder
2021-04-06 12:30:39 +03:00
Dmitriy Novozhilov
22cbb8720a
[FIR] Fix computing labels of anonymous functions (not lambdas)
2021-04-06 12:30:38 +03:00
Dmitriy Novozhilov
8a549cafec
[FIR] Cleanup CheckerContext.kt
2021-04-06 12:30:37 +03:00
Dmitriy Novozhilov
2271bb5d61
[FIR] Add positioning strategy for return keyword
2021-04-06 12:30:36 +03:00
Dmitriy Novozhilov
76f2e349cc
[FIR] Introduce FirReturnExpressionChecker
2021-04-06 12:30:35 +03:00
Dmitriy Novozhilov
5ebd24eac5
[FIR] Save inline status of lambda after resolution
2021-04-06 12:30:34 +03:00
Him188
f90cbb0ce7
Support properties from primary constructor in JvmFieldApplicabilityChecker
...
#KT-32753 In progress
2021-04-06 11:40:44 +03:00
Dmitriy Novozhilov
99e681ec1d
[NI] Assume that ILT is number type in inference
...
#KT-41679 Fixed
2021-04-06 11:40:42 +03:00
Dmitriy Novozhilov
a107e3d160
Support actualization of expect sealed class with typealias in CliSealedClassInheritorsProvider
2021-04-06 11:40:40 +03:00
Dmitriy Novozhilov
fe81078366
Allow sealed inheritors for expect sealed classes in MPP submodules
...
KT-45842 Fixed
KTIJ-7068
2021-04-06 11:40:39 +03:00
Dmitriy Novozhilov
1633190478
Refine expect classes in CliSealedClassInheritorsProvider
...
KT-45796 Fixed
2021-04-06 11:40:36 +03:00
Mikhail Glukhikh
2ee8ac2e15
FirPropertyAccessorChecker: extract checkSetter, suppress properly
2021-04-06 11:13:17 +03:00
Jinseong Jeon
68fb15f9a4
FIR checker: consolidate property accessor checks
2021-04-06 11:13:16 +03:00
nataliya.valtman
bce677f7f7
Generate tests for companion constant changes
2021-04-06 07:13:13 +03:00
Dmitry Petrov
120eba8d3d
Minor: add tests for KT-45893
2021-04-05 17:50:43 +03:00
Andrey Zinovyev
e10df86037
[FIR] Add UPPER_BOUND_IS_EXTENSION_FUNCTION_TYPE diagnostic
2021-04-05 17:15:32 +03:00
yantimirov-timur
9e7f6332d1
[FIR] Complete WRONG_SETTER_TYPE_PARAMETER checker
2021-04-05 16:17:34 +03:00
Julia
5472199bb1
[FIR] Introduce supertypes-for-annotation-class checker
2021-04-05 15:54:57 +03:00
Mikhail Glukhikh
caeb0b43be
FIR: introduce JvmPlatformOverloadsConflictResolver
...
The added here JvmPlatformOverloadsConflictResolver prefers Java field
to property in case of conflicts.
2021-04-05 15:54:49 +03:00
Andrey Zinovyev
67505a0071
[FIR] Add FINAL_UPPER_BOUND checker
2021-04-05 14:51:44 +03:00
Denis.Zharkov
0637748f10
FIR: Introduce NAMED_PARAMETER_NOT_FOUND diagnostic
2021-04-05 12:58:07 +03:00
Jinseong Jeon
2d42e64c17
FIR: prefer flexible type over other equal types when computing intersection
2021-04-05 10:39:51 +03:00
Jinseong Jeon
0d3969597c
FIR: more accurate nullability of intersection of flexible types
2021-04-05 10:39:51 +03:00
Jinseong Jeon
871b5a2174
FIR: fix nullability computation of intersection of flexible types
...
Without this, currently,
it(ft(J..J?), ft(J..J?) => J
which should be ft(J..J?) instead.
2021-04-05 10:39:51 +03:00
Dmitriy Novozhilov
f1cef0fc95
Update testdata
2021-04-03 16:52:05 +03:00
Dmitriy Novozhilov
69aef01b25
Switch IS_PRE_RELEASE flag to false
2021-04-03 13:13:32 +03:00
Ilya Kirillov
5f9d18d8bc
FIR IDE: resolve argument type super types & type args when checking for overridden
...
When we check overrides from IDE, we need to check argument types for subtyping.
When checking for subtyping, we need type parameters declared
in defining classes to be resolved to TYPES phase
and super types to be resolved to SUPER_TYPES phase.
Otherwise, they will be resolved to RAW_FIR and subtyping will throw
"ISE Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl"
2021-04-02 17:24:27 +02:00
Ilya Kirillov
5ceec858aa
FIR IDE: do not search for sealed class inheritors on every class resolve
2021-04-02 17:15:30 +02:00
Tianyu Geng
3f4fa7eb98
FIR checker: make FirFunctionNameChecker a subclass of FirSimpleFunctionChecker
2021-04-02 17:32:22 +03:00
Tianyu Geng
d7cae63cb0
FIR checker: fix UPPER_BOUND_VIOLATED
...
The diagnostics accepts one parameter for the expected upper bound for
the type parameter.
2021-04-02 17:32:22 +03:00
Tianyu Geng
bd64237519
FIR checker: fix checker registration
...
Previously, composed checker passes the `allXXX` flavor of checkers to
each category of checkrs. This makes the composed checkers
non-transparent: behavior changes after composing. In addition, nested
composing would create redundant checkers.
As a result, some checkers registered in the IDE mode
(org.jetbrains.kotlin.idea.fir.low.level.api.diagnostics.AbstractFirIdeDiagnosticsCollector)
are not invoked with the FIR plugin.
This change does two things:
1. pass on checkers to composed checkers without combining
2. use combined checkers in DeclarationCheckersDiagnosticComponent and
ExpressionCheckersDiagnosticComponent
2021-04-02 17:32:22 +03:00
Mikhail Glukhikh
f0ff9ad5a7
FIR: rename AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY to match FE 1.0
2021-04-02 16:22:01 +03:00
Mikhail Glukhikh
e7102cd63f
FIR: fix FQ_NAMES_IN_TYPES renderer
2021-04-02 15:11:02 +03:00
Tianyu Geng
761a0a7d0d
FIR checkers: report specific errors instead of INAPPLICABLE_CANDIDATE
...
Specifically, the report the following 4 errors.
* NON_VARARG_SPREAD
* ARGUMENT_PASSED_TWICE
* TOO_MANY_ARGUMENTS
* NO_VALUE_FOR_PARAMETER
Also added/updated the following position strategies.
* NAME_OF_NAMED_ARGUMENT
* VALUE_ARGUMENTS
2021-04-02 14:36:14 +03:00
Tianyu Geng
fc8d0e3ee0
FIR checkers: report VAL_REASSIGNMENT for assignment operators
...
Currently VAL_REASSIGNMENT are only reported on direct assignments.
Reassignments in the form of, for example, `+=` are reported as
`VARIABLE_EXPECTED`, which differs from FE1.0.
2021-04-02 13:33:52 +03:00
Dmitry Petrov
eefb6e94a9
Minor: update tests to pass on Android
2021-04-02 10:53:30 +03:00
Mikhail Glukhikh
42d53dd954
FIR: introduce delegated & overridden conflict checks
2021-04-02 10:24:20 +03:00
Mikhail Glukhikh
566dc434cc
FIR: introduce MANY_*_MEMBER_NOT_IMPLEMENTED diagnostic
2021-04-02 10:24:20 +03:00
Mikhail Glukhikh
9f27362ee1
Match triangle & diamond intersections in FirTypeIntersectionScope
2021-04-02 10:24:20 +03:00
Dmitry Petrov
19fb7ebfd5
JVM_IR fix local class names for files with @JvmPackageName
2021-04-02 00:08:55 +03:00