Egor Kulikov
70d49999ac
[FIR] Generate an error primary constructor when super call is invalid
...
Merge-request: KT-MR-11026
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2023-07-13 17:37:48 +00:00
Kirill Rakhman
e7c213e06e
[FIR] Report separate error for delegated constructor call to interface
...
#KT-59216 Fixed
2023-07-04 16:00:45 +00:00
Kirill Rakhman
911e62257a
[FIR] Improve INVISIBLE_REFERENCE message
...
Report the nearest invisible containing declaration in cases where
the declaration itself is visible.
#KT-53820 Fixed
2023-06-21 08:36:46 +00:00
Brian Norman
0ff9982b31
[FIR] Additional errors to distinguish resolution to classifier cases
...
When a call is resolved to a classifier, only a single error message was
being used for multiple cases. This lead to confusion as the default
message may not be applicable to a given error case. Added additional
errors and messages to distinguish between these error cases.
#KT-57251 Fixed
2023-06-16 16:26:50 +00:00
Brian Norman
e10a9263d0
[FIR] Only inherit class type parameters if inner class
...
Nested classes which are not inner class should not be able to access
type parameters of the outer class. Make sure access is not available
when resolving super types.
#KT-54748 Fixed
2023-05-31 16:25:51 +00:00
Kirill Rakhman
38f0ac332d
[FIR] Report INVISIBLE_REFERENCE in imports
...
#KT-55405 Fixed
2023-03-31 12:54:30 +00:00
Nikolay Lunyak
bcfafc601e
Add EnumEntries to minimal-stdlib-for-tests
...
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com >
2023-03-02 10:23:38 +00:00
Ivan Kylchik
51ccc32a3f
Update test data after introducing IntrinsicConstEvaluation annotation
2022-05-18 21:19:57 +03:00
Victor Petukhov
27fa632630
[FE 1.0] Update test data with new error type representation
2022-03-23 21:13:33 +00:00
Dmitriy Novozhilov
ff7eb79bb1
[FE 1.0] Prohibit call of constructor of functional supertype
...
^KT-46344
^KT-50730 Fixed
2022-01-14 14:26:50 +03:00
Denis.Zharkov
fba44759c0
FIR: Refine visibility check for class members
2021-10-20 22:05:23 +03:00
Denis.Zharkov
9ca96ebbd2
FIR: Add FirVisibilityQualifierChecker
2021-09-14 19:13:39 +03:00
Tianyu Geng
a18daa5d62
FIR checker: report type parameters on anonymous objects
2021-08-26 12:25:06 +03:00
Tianyu Geng
4d9102f749
FIR checker: fix position strategy of TYPE_PARAMETERS_IN_OBJECT
2021-08-26 12:25:03 +03:00
Ivan Kochurkin
2c1c24c042
[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
2021-08-13 18:32:28 +03:00
Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Dmitriy Novozhilov
d17f984edf
[FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:17:33 +03:00
Ivan Kochurkin
d4e1cded59
[FIR] Implement RESOLUTION_TO_CLASSIFIER
2021-07-28 23:18:38 +03:00
Jinseong Jeon
e2dc21da90
FIR checker: warn useless as and is
2021-05-05 18:20:51 +03:00
Mikhail Glukhikh
80a449862e
FIR: implement diagnostics for qualifier as stand-alone expression case
2021-04-30 17:59:45 +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
Andrey Zinovyev
27766c2575
[FIR] Consistent isLocal for objects inside Enum entries
2021-04-20 18:12:51 +03:00
Dmitriy Novozhilov
53b6d6f767
Prohibit references to members of containing class in super constructor of nested object
...
#KT-25289 In Progress
2021-04-14 18:30:49 +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
fb14b03824
FIR checker: skip error named reference if receiver is unresolved
...
Currently, FIR reports errors caused by previous resolution failure. For
example with unresolved `a` and `b` in code `a.b`, both `a` and `b` are
highlighted. FE1.0 only highlights `a` since it's the root cause. This
change applies this heuristics when reporting FirDiagnostics.
2021-03-29 12:45:27 +03:00
Mikhail Glukhikh
6fee46316e
FIR: fix MANY_COMPANION_OBJECTS positioning
2021-03-01 16:57:55 +03:00
Tianyu Geng
724ca1d3ee
FIR: introduce diagnostic NESTED_CLASS_NOT_ALLOWED
2021-03-01 16:57:54 +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
Denis Zharkov
a5545b96cb
FIR: Fix ambiguity between current Companion and one from supertypes
...
Companion as qualifier should be found at static scope not a member one
2020-11-10 14:26:54 +03:00
Nick
c8f8908a01
[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL
2020-08-24 11:06:10 +03:00
Nick
4669e019d1
[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
2020-08-10 10:09:37 +03:00
Dmitriy Novozhilov
ffd30566be
[FIR] Add FirErrorResolvedQualifier for qualifiers with resolve diagnostic
2020-08-04 08:59:14 +03:00
Mikhail Glukhikh
951aa8185e
[FIR] Avoid duplicate diagnostics on expression.typeRef
2020-08-02 18:19:47 +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
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
26e3a111d6
[FIR] Add diagnostics for object related problems
2020-07-31 19:34:55 +03:00
Dmitriy Novozhilov
f270cd8d6e
[FIR] Update testdata due to lack of callee reference in FirResolvedQualifier
2020-07-28 20:47:07 +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
Mikhail Glukhikh
b27152f903
Replace some FIR syntax errors with more proper diagnostics
2020-03-27 16:46:59 +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
Mikhail Glukhikh
14204a842a
Refactoring & clarification: implement new FIR tower resolver
2020-01-27 00:34:16 +03:00
Simon Ogorodnik
13132e69a3
[FIR] Start enum entries reworking
2020-01-10 10:23:50 +03:00
simon.ogorodnik
5e426fdc71
[FIR] Optimization & checking fix: remove usage of dispatchReceiverValue
2019-12-27 13:45:59 +03:00
Mikhail Zarechenskiy
8871c8b4fd
Migrate diagnostic tests to 1.4
2019-12-26 15:08:51 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
Dmitriy Novozhilov
49a42f9434
Fix #KT-28999. Prohibit type parameters on anonymous objects
2019-02-17 13:02:22 +03:00
Dmitriy Novozhilov
11e5ddf9ae
Add test for #KT-28999
2019-02-17 13:02:22 +03:00