Commit Graph

155 Commits

Author SHA1 Message Date
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
Andrey Zinovyev b2f3485d7c [FIR] Add ILLEGAL_INLINE_PARAMETER_MODIFIER diagnostic 2021-08-04 17:33:14 +03:00
Andrey Zinovyev 015c2d1875 [FIR] Add NOTHING_TO_INLINE diagnostic 2021-08-04 17:33:08 +03:00
Dmitriy Novozhilov c3060e861f [FIR] Add expect actual checker 2021-07-20 10:33:49 +03:00
Ivan Kochurkin bc3c05a3bd [FIR] Replace lists with Long in Modifier, refactor Modifier and derived classes 2021-06-17 13:49:08 +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
Denis.Zharkov b94335dd1c FIR: Update diagnostics test data
Green code correctly became red
2021-05-20 17:24:30 +03:00
Andrey Zinovyev d38effcbbe Use camel-case in FirFunctionCallOrigin
Also componentCall is operator call
2021-05-20 13:46:35 +03:00
Andrey Zinovyev 07a8ae7e71 [FIR] Mark more calls origin as OPERATOR 2021-05-20 13:46:32 +03:00
Andrey Zinovyev e021e25d6c [FIR] Resolve operator calls to operator functions only 2021-05-20 13:46:29 +03:00
Andrey Zinovyev b1c8669b43 [FIR] Resolve infix calls to infix functions only
Implements INFIX_MODIFIER_REQUIRED diagnostics
2021-05-20 13:46:27 +03:00
Andrey Zinovyev 14fe570a00 [FIR] Add more type params checks
VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED
BOUND_ON_TYPE_ALIAS_PARAMETER_NOT_ALLOWED
2021-04-14 18:11:09 +03:00
zadorotskas 334d0a8b5a FIR: introduce three diagnostics for const val 2021-04-13 21:36:46 +03:00
Ivan Kochurkin ad9b962536 [FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE) 2021-04-12 23:49:55 +03:00
Julia 5472199bb1 [FIR] Introduce supertypes-for-annotation-class checker 2021-04-05 15:54:57 +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
Tianyu Geng 253c389f4a FIR checker: fix failed test files after sync 2021-03-29 12:45:27 +03:00
Mikhail Glukhikh 9ce8420491 FIR: introduce not implemented checker 2021-03-24 16:07:25 +03:00
Br0mm 75e4c74256 [FIR] Add FirConstValWithGetterOrDelegateChecker 2021-03-22 15:05:40 +03:00
Mark Punzalan 315047b164 FIR checker: Make FirJvmExternalDeclarationChecker a
FirMemberDeclarationChecker.

Set isExternal in status for FirRegularClass. Invoke member declaration
checkers for FirRegularClass.
2021-03-17 10:45:26 +01:00
Mark Punzalan c3d2ce0c1f FIR checker/IDE: Add checker and quickfix for WRONG_MODIFIER_TARGET.
There are only simple checks for `external` and `const` for now. The
rest of the checks (see ModifiersChecker in FE1.0) will be added later.
2021-03-17 10:45:26 +01:00
Jinseong Jeon e009b71f88 FIR checker: report uninitialized member/extension properties 2021-03-04 17:56:29 +03:00
Mikhail Glukhikh 6470b713d5 FIR: set isConst on primary constructor properties 2021-03-04 16:13:50 +03:00
Mikhail Glukhikh d7a6fc80b0 FIR: don't report CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT on variables 2021-03-04 16:13:50 +03:00
Br0mm dd3bc1a964 FIR: Introduce CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT diagnostic 2021-03-04 16:13:50 +03:00
Tianyu Geng 724ca1d3ee FIR: introduce diagnostic NESTED_CLASS_NOT_ALLOWED 2021-03-01 16:57:54 +03:00
Tianyu Geng 6b453d9b23 FIR: implement checker for open members
Specifically,

1. NON_FINAL_MEMBER_IN_FINAL_CLASS
2. NON_FINAL_MEMBER_IN_OBJECT
2021-02-19 10:17:18 +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 bd37badf29 FIR checker: add diagnostics for backing fields 2021-02-10 12:29:34 +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 f9378a3ab7 FIR checker: add diagnostic EXPECTED_DECLARATION_WITH_BODY 2021-01-27 19:46:06 +03:00
Jinseong Jeon 6b5ee6c9f9 FIR checker: warn redundant open in interface members properly 2021-01-15 14:38:37 +03:00
Jinseong Jeon 39df3e2b0a FIR checker: introduce member function checker 2021-01-15 14:38:35 +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
Jinseong Jeon 5167d69b7c FIR checker: introduce member property checker 2020-12-04 16:58:30 +03:00
sebastian.sellmair 06cb64bb51 Allow open callable members in expect interfaces
#KT-42094 fixed
2020-11-11 17:41:59 +00:00
Лихолетов Михаил cfc1ebb4be [FIR] Support several annotation argument diagnostics 2020-09-16 16:53:31 +03:00
Mikhail Glukhikh 8fd087a964 [FIR] Don't report duplicated UNRESOLVED_REFERENCE on annotation entries 2020-08-04 08:59:15 +03:00
Dmitriy Novozhilov 721b9b4d8c [FIR] Resolve annotations as calls 2020-08-04 08:59:14 +03:00
Nick 889324e972 [FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND 2020-08-02 18:19:45 +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
Nick a5f34a880c [FIR] Fix computeTypeArguments() & add diagnostic for type args 2020-07-07 15:52:17 +03:00
Denis Zharkov fa3b3e7a9a FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER 2020-04-21 09:48:03 +03:00
Mikhail Glukhikh c1b9fdd2f3 Fix diagnostic test data to be consistent with FIR test data 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 Gorbunov b1766b167f Remove mod function usage from tests
#KT-26654
2020-01-23 19:28:23 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00