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
Mikhail Glukhikh
22c0ddaa48
Destructuring declaration initializer now cannot use extension componentX() on nullable #KT-7794 Fixed
2016-01-26 19:03:28 +03:00
Mikhail Glukhikh
c8b50eec1e
Enum.values: deprecation (warning) --> deprecation (error)
2015-12-11 11:11:42 +03:00
Mikhail Glukhikh
dc60c62781
Enum.values is now deprecated but Enum.values() is no more deprecated
2015-11-23 17:29:36 +03:00
Mikhail Glukhikh
cd1b58f2eb
Final in interfaces: deprecation ---> error + relevant test fixes
2015-11-20 15:43:19 +03:00
Mikhail Glukhikh
dd43674426
Data class must have at least one argument is reported on constructor parameter list now, if any #KT-9999 Fixed
2015-11-16 10:45:54 +03:00
Alexey Tsvetkov
dc27363452
Remove @annotation from test data
2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
1973573a89
Remove @data from test data
2015-10-19 20:45:00 +03:00
Denis Zharkov
1c02231cda
Regenerate rendered descriptors after transforming Enum.values to property
2015-10-17 17:46:16 +03:00
Mikhail Glukhikh
f8a356747e
Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated
2015-10-14 20:40:13 +03:00
Mikhail Glukhikh
fff434d377
data + open / inner / abstract / sealed are now forbidden
2015-10-07 15:13:14 +03:00
Mikhail Glukhikh
930402d910
Incorrect 'inner' usage is diagnosed by parent, not by target
2015-09-30 17:54:47 +03:00