Ivan Kochurkin
2c1c24c042
[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
2021-08-13 18:32:28 +03:00
Ivan Kochurkin
cd6384eb20
[FIR] Fix handling of WRONG_MODIFIER_TARGET
...
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Ivan Kochurkin
2ca3adbcb2
[FIR] Throw REDECLARATION for duplicated type parameters in declarations
2021-08-10 15:09:27 +00:00
Ivan Kochurkin
9736cc162b
[FIR] Throw REDECLARATION for duplicated value parameters in function
...
Add new test file
2021-08-10 15:09:26 +00:00
Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Andrey Zinovyev
b36f8ed8f5
[FIR] DATA_CLASS_OVERRIDE_CONFLICT diagnostic
2021-07-08 18:13:48 +03:00
Andrey Zinovyev
b44785c24e
[FIR] NOTHING_TO_OVERRIDE diagnostic
2021-07-08 18:13:47 +03:00
Denis.Zharkov
ddbdfafa79
Remove OI/NI attributes from test data
2021-05-25 13:28:27 +03:00
Denis.Zharkov
2ecba6ac39
Remove WITH_NEW_INFERENCE directive from all tests
...
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00
Mikhail Glukhikh
0f9f63400e
FirSupertypesChecker: implement six more diagnostics
2021-05-13 16:13:43 +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
111e67dc8d
Use DECLARATION_NAME strategy for FirErrors.PRIMARY_CONSTRUCTOR_REQUIRED
2021-03-11 13:25:52 +03:00
Tianyu Geng
6e8bad6ef6
FIR: Implement data class constructor checker
2021-03-11 13:25:51 +03:00
Dmitriy Novozhilov
f3a8fcaea6
[FE] Make constructors of sealed classes protected instead of internal
2021-02-12 13:36:38 +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
f14bd87ecc
[Test] Update testdata of diagnostic tests during to change language to 1.5
...
Mostly this commit contains changes of descriptor dump of sealed classes
tests according to changed visibility of sealed class constructor
2021-01-28 13:19:24 +03:00
Jinseong Jeon
f1d8a6e5d1
FIR checker: introduce DECLARATION_SIGNATURE_OR_DEFAULT positioning strategy
...
and fix CONFLICTING_OVERLOADS to use it
2021-01-21 16:06:09 +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
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
Nick
7086b0cbf3
[FIR] Don't report duplicated errors in component calls typeRefs
2020-08-02 18:19:46 +03:00
Nick
4ceae8dc5e
[FIR] Don't report duplicated errors in function calls typeRefs
2020-08-02 18:19:46 +03:00
Nick
6f85a07290
[FIR] Don't report duplicated errors in property declarations
2020-08-02 18:19:46 +03:00
Nick
889324e972
[FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND
2020-08-02 18:19:45 +03:00
Mikhail Glukhikh
9335e09149
[FIR] Don't report duplicated errors in implicit properties / parameters
2020-08-02 18:19:45 +03:00
Mikhail Glukhikh
749346b73b
[FIR] Don't report duplicated errors on default accessor error type refs
2020-08-02 18:19:45 +03:00
Mikhail Glukhikh
e0d25876b0
[FIR] Don't report simple diagnostics on fake sources
2020-08-02 18:19:44 +03:00
Mikhail Glukhikh
0804c6a0f3
[FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors
...
This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
2020-08-02 18:19:44 +03:00
Mikhail Glukhikh
b27152f903
Replace some FIR syntax errors with more proper diagnostics
2020-03-27 16:46:59 +03:00
FenstonSingel
b7d8e879a6
[FIR] Support 4 diagnostics for pairs of modifiers
...
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +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
Ilya Chernikov
6356807997
Reapply "Only create descriptors for candidates with lambda args"
...
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
victor.petukhov
46bd5ba107
Add alphabetical sorting diagnostics with same ranges
2019-02-14 12:31:42 +03:00
Kirill Rakhman
8bc020f31b
Fix modifier order in generated overriden functions
...
Fixes #KT-21600
2018-01-16 15:42:02 +01:00
Dmitry Savvinov
816d89e393
[NI] Improved testdata after changes in applicabilities
...
This commits introduces testdata changes, where NI behaviour strictly
improved, after several previous fixes.
For some tests, just WITH_NEW_INFERENCE directive was added. It
indicates, that some of previous commits first introduced error in that
test, and then some other commit fixed it (netting no overall testdata
change). It is preferrably to keep those annotations until we will
migrate to NI completely, to prevent unexpected regressions.
2017-12-07 12:49:56 +03:00
Mikhail Zarechenskiy
8757298994
Add diagnostics to test data from NI
2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy
a71238bf94
Place !WITH_NEW_INFERENCE directive to diagnostics test data
2017-11-29 02:53:49 +03:00
Dmitry Petrov
4c2cfd3ea9
Synthesized 'copy' in data classes cannot override anything since 1.3
...
Synthesized 'copy' introduces default values for parameters, which is
prohibited for regular overrides.
Report warning in language version 1.2-, error in 1.3+.
2017-09-14 10:13:22 +03:00
Mikhail Zarechenskiy
f5cd8c7e4d
Relax name shadowing warning on parameter names
...
#KT-17611 Fixed
2017-07-07 14:19:57 +03:00
Mikhail Zarechenskiy
32f609ceee
Check lambda parameter for name shadowing
...
#KT-5160 Fixed
2017-04-17 17:12:44 +03:00
Pavel V. Talanov
d94da5af40
Frontend: create component functions for properties with error types
...
Fixes an inconsistency in light classes where we could have different
class structure depending on whether the type was resolved
2017-03-15 20:55:00 +03:00
Mikhail Glukhikh
7a41d13b41
Do not add special names to scopes #KT-14319 Fixed
2016-10-13 17:17:05 +03:00
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +03:00
Alexander Udalov
fea116f14e
Allow data classes to implement equals/hashCode/toString from base classes
...
#KT-11306 Fixed
2016-09-15 16:45:48 +03:00
Denis Zharkov
7a9af072b4
Fix ClassCastException when data object is being analyzed
...
#KT-12687 Fixed
2016-07-10 15:04:32 +03:00
Alexander Udalov
e68de436bb
Allow data classes to inherit from other classes
...
#KT-10330 Fixed
2016-06-22 21:35:57 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Denis Zharkov
816c66063b
Report special diagnostic when fake-call receiver is nullable
...
#KT-3602 Fixed
2016-02-02 08:17:49 +03:00