Dmitriy Novozhilov
fa33c5dc79
[FIR] Implement deprecation warning for synthetic without java base getter
...
Also implement new resolution behavior under language feature
^KT-63076 Fixed
^KT-64358
2023-12-19 09:04:26 +00:00
Nikolay Lunyak
425d5e808b
[FIR] Link some tests with issues
...
Just in case.
^KT-59874
2023-11-14 15:19:33 +00:00
Brian Norman
ad4d075125
[FIR] Do not allow vararg function to be used as synthetic setter
...
^KT-63172 Fixed
2023-11-08 12:22:29 +00:00
Dmitriy Novozhilov
c3f3a4192c
[FIR] Check supertypes hierarchy for java classes during creation of synhtetic properies
...
^KT-62394 Fixed
2023-10-17 12:46:28 +00:00
Kirill Rakhman
4e041494be
[FIR] Report DEPRECATION when Java declaration is deprecated in javadoc
...
#KT-60682
2023-08-31 10:19:33 +00:00
Nikita Bobko
5a96754aec
Shift ReferencesToSyntheticJavaProperties feature release from 1.9 to 2.1
...
Other related tests:
- testGenericJavaProperty
- testFunInterfaceConstructorReference
Meta issue: KT-8575
Review: https://jetbrains.team/p/kt/reviews/9595
UnsupportedSyntheticCallableReferenceChecker only existed for K1,
because we wanted to release the feature for 1.9 and the feature should
have been working for K2 unconditionally. But since, we're postponing
the release until 2.1, we also need to port the checker from K1 to K2
2023-04-17 17:42:01 +00:00
Stanislav Ruban
5b0b7c4da4
KT-57206: Add diagnostics test
...
Problem described in KT-57206 seems to have been fixed by KT-56506. This
commit adds code example from KT-57206 as a diagnostics test.
^KT-57206 Fixed
2023-03-10 14:03:43 +00:00
Kirill Rakhman
1eb18f13bd
FIR: Fix test data after making LHS of assignment an expression
...
KT-54648
2023-01-31 08:39:43 +00:00
Kirill Rakhman
f6c189be7b
FIR: Handle visibility of public setter of protected synthetic property like in K1
...
K1 allows writing access to a public setter of a protected synthetic
property only if the call is inside a subclass. K2 previously allowed
that unconditionally. This changes brings the behavior in line with K1.
^KT-56050 Fixed
2023-01-26 11:33:30 +00:00
Pavel Mikhailovskii
f4bdf54601
KT-8575 Fix warnings for Java synthetic properties
2022-10-10 22:03:58 +00:00
Victor Petukhov
42e71f8c53
Remove explicit enabling the new type inference from test data
2022-07-22 16:03:52 +00:00
Mikhail Glukhikh
029e946fb2
FIR: report VAL_REASSIGNMENT on synthetic immutable properties
...
#KT-50972 Fixed
2022-02-01 18:48:50 +03:00
Denis.Zharkov
0bdea4f20a
FIR: Do not create incorrect synthetic property
2021-10-26 18:45:59 +03:00
Denis.Zharkov
52c2908bb7
FIR: Fix another inconsistency with FE1.0 in synthetic properties resolution
2021-10-26 18:45:59 +03:00
Ivan Kochurkin
75b40e4b75
[FIR] Add INVISIBLE_SETTER
2021-10-03 17:10:06 +03:00
Mark Punzalan
42abc4a3af
FIR: Don't use AnnotationUseSiteTarget.PROPERTY_GETTER when computing
...
deprecation from a callable reference use site.
Also fixed positioning of DEPRECATION(_ERROR) diagnostics on variable
assignments.
2021-09-29 19:39:17 +03:00
Tianyu Geng
f35680f0a4
FIR checker: resolve property with protected getter and public setter
...
Assuming Java class `Super` has a protected `getName` method and a
public `setName` method.
Then, in a subclass of `Super`, FE1.0 allows calls to `setName` via the
property syntax if the property is protected and invisible due to
dispatch receiver is not `this` or `super`.
2021-09-29 19:39:12 +03:00
Tianyu Geng
c7272f6986
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
...
Currently DFA does not set "definitely equal to null" for access to variables that got assigned `null`. For example, FIR should mark the following line as SENSELESS_COMPARISON due to `s = null` above.
https://github.com/JetBrains/kotlin/blob/d1531f9cdd5852352c0133198706125dc63b6007/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.fir.kt#L6
The problem is at https://github.com/JetBrains/kotlin/blob/7e9f27436a77de1c76e3705da7aa1fbe8938336b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt#L1104
For null assignment, ideally the type should be `Nothing?`. This is
addressed in a followup commit instead.
2021-08-06 22:57:16 +03:00
Ivan Kochurkin
afb85026c4
Revert "[FIR] Implement INVISIBLE_SETTER"
...
This reverts commit b3d7ed56
2021-08-02 20:10:22 +03:00
Ivan Kochurkin
b3d7ed569d
[FIR] Implement INVISIBLE_SETTER
2021-07-30 18:07:34 +03:00
Andrey Zinovyev
de3f31cf78
[FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
...
No support for inheritance deprecations
and deprecations in qualifier's parts
2021-07-07 16:19:28 +03:00
Ivan Kochurkin
59257e47c9
[FIR] Implement FUNCTION_CALL_EXPECTED
2021-06-29 22:39:22 +03:00
Ivan Kochurkin
e57108d4e8
[FIR] Implement ASSIGNMENT_TYPE_MISMATCH, RESULT_TYPE_MISMATCH diagnostics, fix tests
2021-05-17 22:33:16 +03:00
pyos
e6d923f65c
FIR: rename HIDDEN to INVISIBLE_REFERENCE
...
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
Ivan Kochurkin
4353365968
[FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests
2021-04-19 12:46:08 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00
Dmitriy Novozhilov
cd890d5833
[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
2021-03-29 16:12:29 +03:00
Mikhail Glukhikh
7d4eaefd36
FIR: report UNSAFE_CALL on dot when possible
2021-01-29 16:55:26 +03:00
Jinseong Jeon
e72ddbcbfe
FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE
...
To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
2021-01-29 16:54:23 +03:00
Dmitriy Novozhilov
e6b5cb5216
[TD] Update diagnostics test data due to new test runners
...
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00
Mikhail Glukhikh
babc7845af
FirSyntheticPropertiesScope: support case with derived getter
...
#KT-42496 Fixed
2020-10-14 16:33:44 +03: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
Dmitriy Novozhilov
f283f2db43
[FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
...
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00
Denis Zharkov
72b09ff323
FIR: Rename FirSuperTypeScope and reuse it for type parameter type
...
It would allow ConeKotlinType.scope return FirTypeScope
and thus pulling down org.jetbrains.kotlin.fir.scopes.FirScope#processOverriddenFunctions
(See the following commits)
2020-06-11 11:31:31 +03:00
Denis Zharkov
38922a84f1
FIR: Do not create synthetic properties for non-Java accessors
...
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
Mikhail Glukhikh
8884cbe415
Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
2020-03-05 09:39:40 +03:00
Mikhail Glukhikh
cc0e39ebca
[FIR] Support synthetic property setters
2020-02-10 18:51:34 +03:00
simon.ogorodnik
34e6649d31
[FIR] Harden check of argument type properly
...
Before this commit, nullable argument could match not null parameter.
Now we require also correct nullability that breaks some cases
2020-02-03 16:45:18 +03:00
Mikhail Glukhikh
84c8697720
[FIR] Do not build synthetics for static or Unit returning get
2020-01-23 12:32:40 +03:00
Mikhail Zarechenskiy
588259a034
Add feature that allows references to synthetic properties with warning
...
See KT-35933 for details
2020-01-16 09:37:34 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
Mikhail Zarechenskiy
7541a3754d
Move SAM constructors to synthetic scope
2017-05-05 21:30:35 +03:00
Valentin Kipyatkov
ec51076355
DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers
2016-10-11 23:38:54 +03:00
Valentin Kipyatkov
41ee06ec96
Use parameter names in DescriptorRenderer
2016-10-11 23:38:49 +03:00
Valentin Kipyatkov
a1d760fc36
KT-10631 Consider creating a synthetic property even when the setter returns 'this'
...
#KT-10631 Fixed
2016-01-19 15:57:20 +03:00
Alexander Udalov
0ba0ea5e1f
Report 'unsupported' on synthetic Java property references
...
#KT-8575 Open
2015-12-16 19:50:15 +03:00
Dmitry Petrov
ef72c594c4
KT-1934 & KT-10197:
...
Naive approximation for fake overriding signature:
use upper bound for flexible types.
Check delegation errors.
2015-12-09 17:43:47 +03:00
Mikhail Glukhikh
811ba8110f
Implicit receiver smart casts implementation and highlighting
2015-11-17 10:26:42 +03:00
Valentin Kipyatkov
8e6b0a26bb
Synthetic extensions to take all annotations from original declarations
...
#KT-9387 Fixed
2015-10-20 10:12:34 +03:00
Denis Zharkov
f0e3fd617d
Adjust testData to CharSequence.length transformation
2015-10-14 20:39:35 +03:00