Roman Efremov
3c8855c152
[LightTree] Fix positioning of VAR_TYPE_MISMATCH_ON_OVERRIDE in LT
...
The problem is that `override var b: String` in constructor has token
type `VALUE_PARAMETER`, thus was not considered as declaration.
^KT-62704
2024-01-29 14:09:59 +00:00
Roman Efremov
8edb1842a5
[Tests] Add spec tests in FIR + LightTree configuration
...
In some tests PSI and LT differ. Test data was fixed accordingly.
In the following tests I consider that difference is acceptable:
- compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg/3.1.kt
- compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg/4.1.kt
This is because:
- It only happens when recovering from syntax errors happened above in
code. I was unable to reproduce it in valid code.
- It doesn't break parsing further, the rest of the errors in file are
reported identically.
The rest of the tests will be fixed in subsequent commits.
^KT-62704 Fixed
2024-01-29 14:09:59 +00:00
Nikolay Lunyak
7541732752
[FIR] Fix TEST SPEC tests
...
Ensure the test data contents for both the frontends
are identical. This is needed for proper analysis of
K2-differences.
2023-06-19 07:40:15 +00:00
Dmitrii Gridin
72def186a3
[LL FIR] rework transformers, so transformers resolve only a specific set of declarations
...
The change is needed for the parallel resolution (^KT-55750), so we can resolve the declaration
under a lock that is specific to this declaration.
Previously, if LL FIR was resolving some FirClass, LL FIR resolved all its children too, and it had no control over what parts of the FIR tree were modified.
The same applied to the designation path, sometimes the classes on the designation path
might be unexpectedly (and without lock) modified.
This commit introduces LLFirResolveTarget, which specifies which exact declarations should be resolved during the lazy resolution of the declaration.
All elements outside the declarations specified for resolve in LLFirResolveTarget, should not be modified.
The logic of lazy transformers is the following:
- Go to target declaration collecting all scopes from the file and containing classes
- Resolve only declarations that are specified by the LLFirResolveTarget, performing the resolve under a separate lock for each declaration
^KT-56543
^KT-57619 Fixed
2023-04-19 20:12:38 +00:00
Kirill Rakhman
1f0d56e157
[FIR] Make type parameters inaccessible for non-inner nested types
...
#KT-57209
2023-03-28 13:20:53 +00:00
Dmitrii Gridin
9a4a3d1f49
[LL FIR] introduce test with reversed resolve order
...
^KT-56543
Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com >
2023-03-22 17:34:07 +00:00
Mikhail Glukhikh
2598ecf23f
Revert "K2: fix internal visibility checks for overrides #KT-53197 Fixed"
...
This reverts commit 166965e559 .
2022-08-05 18:26:59 +02:00
Mikhail Glukhikh
166965e559
K2: fix internal visibility checks for overrides #KT-53197 Fixed
2022-08-03 07:52:14 +00:00
Victor Petukhov
42e71f8c53
Remove explicit enabling the new type inference from test data
2022-07-22 16:03:52 +00:00
Ilya Kirillov
3b55585782
[tests] Fix file path in testdata
2022-04-13 12:53:03 +02:00
Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Dmitriy Novozhilov
b584fed93d
[FIR] Migrate warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:20:11 +03:00
Dmitriy Novozhilov
d17f984edf
[FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:17:33 +03:00
Andrey Zinovyev
9452b788bf
[FIR] Implement CANNOT_OVERRIDE_INVISIBLE_MEMBER diagnostic
2021-07-08 18:13:46 +03:00
Ilya Kirillov
a8a31231f7
Get rid of duplicated file names in spec tests
...
Otherwise, corresponding IDE tests would fail on creation duplicated
files in the same directory
2021-06-04 13:16:17 +02:00
Ivan Kochurkin
c4c2fbb5a0
[FIR] Implement RECURSIVE_TYPEALIAS_EXPANSION, CYCLIC_INHERITANCE_HIERARCHY diagnostics, fix stackoverlow exception in case if typealias points to type with type arguments
2021-06-03 20:41:58 +03:00
Mikhail Glukhikh
84ccf7bbb1
FIR: use Java 8 rules in not implemented checker
2021-04-30 17:59:38 +03:00
Ivan Kochurkin
d54808e33f
[FIR] Implement CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS diagnostics, fix tests
2021-04-27 18:27:39 +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
Mikhail Glukhikh
818c54e3a6
FIR: report ABSTRACT_*_NOT_IMPLEMENTED on appropriate intersections
2021-04-09 14:52:34 +03:00
Mikhail Glukhikh
449a79151a
FirNotImplementedOverrideChecker: check also anonymous objects / enums
2021-03-24 16:07:30 +03:00
Mikhail Glukhikh
82b8cc333e
FIR: introduce INVISIBLE_ABSTRACT_MEMBER_FROM_SUPER
2021-03-24 16:07:28 +03:00
Mikhail Glukhikh
9ce8420491
FIR: introduce not implemented checker
2021-03-24 16:07:25 +03:00
Tianyu Geng
6e8bad6ef6
FIR: Implement data class constructor checker
2021-03-11 13:25:51 +03:00
Jinseong Jeon
e009b71f88
FIR checker: report uninitialized member/extension properties
2021-03-04 17:56:29 +03:00
Dmitriy Novozhilov
2b39282682
[FIR] Render original type before smartcasted type in DEBUG_INFO_EXPRESSION_TYPE
...
This is made for keep consistency with same renderer in FE 1.0
2021-02-16 17:51:32 +03:00
Jinseong Jeon
09640d9d63
FIR checker: apply override checker to anonymous objects
...
^KT-44695 Fixed
2021-02-15 19:16:35 +03:00
Jinseong Jeon
266432a482
FIR checker: fix condition for property type mismatch on override
2021-02-08 13:01:11 +03:00
Jinseong Jeon
3a07ca4c64
FIR checker: add diagnostic VAR_OVERRIDDEN_BY_VAL
2021-02-03 12:07:36 +03:00
Jinseong Jeon
39df3e2b0a
FIR checker: introduce member function checker
2021-01-15 14:38:35 +03:00
Jinseong Jeon
5167d69b7c
FIR checker: introduce member property checker
2020-12-04 16:58:30 +03:00
Dmitriy Novozhilov
bf1a00c73a
[FIR] Rework resolution of declaration statuses
...
There is introduced algorithm of resolution with jumps: before
resolution of some class we resolve all status of members of its
supertypes, so we can properly determine inherited visibility
and modifiers
2020-10-21 11:53:10 +03:00
Nick
61e21dadec
[FIR] Add 3 type mismatch diagnostics
2020-08-24 11:06:12 +03:00
Nick
4669e019d1
[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
2020-08-10 10:09:37 +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
anastasiia.spaseeva
5c0528b61e
[Spec tests] Add tests for primary constructors declaration
2020-07-28 20:26:33 +03:00
anastasiia.spaseeva
bef59055cd
[Spec tests] Fix test cases structure
2020-07-28 20:26:31 +03:00
anastasiia.spaseeva
9d862aaa1d
[Spec tests] Remove spec info from fir tests
2020-05-26 17:27:06 +03:00
anastasiia.spaseeva
d9160a26e9
[Spec tests] Add property helpers to testMaps
2020-05-22 02:52:02 +03:00
anastasiia.spaseeva
3a46b5a45a
[Spec tests] Add path element at testMaps for main links also
2020-05-22 02:52:00 +03:00
anastasiia.spaseeva
d94c212a60
[Spec tests] Add linkType element to testMaps
2020-05-22 02:51:59 +03:00
anastasiia.spaseeva
d32aca87d1
[Spec tests] Change metadata structure of implementation and spec tests
2020-05-22 02:51:57 +03:00
Denis Zharkov
d66281d11f
FIR: Fix test data for spec test after c4b7ac994b
2020-04-23 11:24:49 +03:00
Denis Zharkov
3bb6aa6f28
Mark as FIR_IDENTICAL passing spec tests
2020-04-21 10:16:42 +03:00
Denis Zharkov
00bf1858cc
FIR: Adjust testData for spec tests: declarations
2020-04-21 09:52:52 +03:00
anastasiia.spaseeva
a41c4c84a6
[Spec-tests] Add tests for prefix increment expression
2020-01-09 17:16:09 +03:00
anastasiia.spaseeva
f95a03cba3
[Spec-tests] Add tests for abstract classes
2020-01-09 17:16:09 +03:00
anastasiia.spaseeva
6c644448c2
[Spec tests] Add tests for abstract classes
2020-01-09 17:16:09 +03:00
anastasiia.spaseeva
20ed66cd82
[Spec tests] Add remove link to the issue KT-27825 from all tests which are not related to the issue
2020-01-09 17:16:09 +03:00
anastasiia.spaseeva
6accbf6284
[Spec tests] Add prefix increment expression codegen tests
2020-01-09 17:16:09 +03:00