Commit Graph

41 Commits

Author SHA1 Message Date
Mikhail Glukhikh 978d52d05b K2: render additionally *s for static references
This commit allows to distinguish static VS non-static things
inside FIR_DUMP, e.g. static synthetic Enum.entries with
enum entry Enum.entries
2023-06-21 13:08:00 +00:00
Kirill Rakhman 38f0ac332d [FIR] Report INVISIBLE_REFERENCE in imports
#KT-55405 Fixed
2023-03-31 12:54:30 +00:00
Denis.Zharkov b6b132a9a3 K2: Avoid false-positive overload resolution ambiguity with smart casts
The idea is that when we have successful candidates both from smart cast
and original type, we should discriminate in the favor of former ones.

While this problem (see kt55722.kt) existed before this branch is merged,
initially it was recognized on FP Ultimate when we stopped assuming
captured types from the same projections as equal (see kt55722Initial.kt).

^KT-55722 Fixed
^KT-55024 Fixed
^KT-56283 Related
^KT-56310 Related
2023-02-15 08:13:54 +00:00
Kirill Rakhman 1eb18f13bd FIR: Fix test data after making LHS of assignment an expression
KT-54648
2023-01-31 08:39:43 +00:00
Mikhail Glukhikh 8aed6d3c4c K2: add dispatchReceiverForStatics to ScopeTowerLevel to avoid receiver hacks
Related to KT-55116
2023-01-26 15:27:58 +00:00
Mikhail Glukhikh d436d56871 FE: add some more tests around static field fake overrides 2023-01-26 15:27:58 +00:00
Mikhail Glukhikh 4167a69e30 K2: generate implicit dispatch receivers for static members called
#KT-55371 Fixed
#KT-55372 Fixed
2023-01-26 15:27:57 +00:00
Mikhail Glukhikh 9cfcf057ef K2: expand qualifier type aliases in visibility checker & in FIR2IR
#KT-55408 Fixed
2023-01-26 15:27:56 +00:00
Mikhail Glukhikh ead319f832 K2: add test for KT-55408 2023-01-26 15:27:56 +00:00
Dmitriy Novozhilov b174bb8844 [FIR] Update testdata after introducing FirResolvedErrorReference 2022-12-15 12:12:19 +00:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Mikhail Glukhikh f070401bb5 K2: fix visibility checks for static overrides via imported from static
#KT-53441 In Progress
2022-11-11 13:30:35 +00:00
Dmitriy Novozhilov 64e21af03b [FIR] Consider containing class during visibility check of static function call
^KT-53441
2022-10-19 11:09:32 +00:00
Dmitriy Novozhilov 5665139865 [Test] Add test for KT-54125 2022-10-19 11:09:31 +00:00
Mikhail Glukhikh bcd7a531b9 K2: filter invisible overridden in status resolver & FIR2IR
Related to KT-53197
2022-09-29 08:34:13 +00:00
pyos 3a5d75fd22 K2: introduce platform-specific visibility checks for overrides + tests
Related to KT-53197
2022-09-29 08:34:13 +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
Mikhail Glukhikh 623f832bfd FIR: fix private-to-this corner case with outer class type parameter
Related to KT-49875
2022-07-15 07:57:42 +00:00
Mikhail Glukhikh d16e5e5e50 FIR: Support checking PRIVATE_TO_THIS visibility #KT-49875 Fixed 2022-07-15 07:57:41 +00:00
Mikhail Glukhikh 83200f8774 FIR: Support inferring PRIVATE_TO_THIS visibility see KT-49875 2022-07-15 07:57:41 +00:00
Denis.Zharkov 461d91a10e FIR: Rework checking dispatch receivers applicability
Using `ownerLookupTag` might be wrong in case of private constuctors
 of inner classes: their owner is an Inner class, but expected
 dispach receiver is Outer
2022-06-01 16:02:31 +00:00
Denis.Zharkov 67e6687e89 FIR: Fix FP error on a call to constructor of a private inner class
Do not check dispatch receiver applicability when checking visibility
for containing class of a callee constructor
2022-06-01 16:02:30 +00:00
Denis.Zharkov c1904004c4 FIR: Fix case when smartcast receiver is used for call to private method
^KT-54432 Fixed
2022-06-01 16:02:30 +00:00
Denis.Zharkov ccc32b4e3b FIR: Refine visibility check for private methods defined in a class
- use-site should be contained within the class that owns callee symbol
- class-representative of dispatch receiver value
should be exactly the same as a container class of a callee (not its subtype)
2022-06-01 16:02:29 +00:00
Dmitriy Novozhilov 6e2402620f [FIR] Fix collecting member candidates on receiver with smartcast
^KT-51460 Fixed
^KT-51827
2022-04-07 12:18:48 +00:00
Ivan Kochurkin f68c8f8f01 [FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed 2021-12-09 12:31:24 +00:00
Dmitriy Novozhilov 2b84e8e68f [FIR] Pass proper containing classes from context to type resolution for local classes 2021-11-26 11:26:24 +03:00
Dmitriy Novozhilov 8707be51c9 [FIR] Report errors about invisible types from type resolution 2021-11-26 11:26:17 +03:00
Denis.Zharkov fba44759c0 FIR: Refine visibility check for class members 2021-10-20 22:05:23 +03:00
Ivan Kochurkin 75b40e4b75 [FIR] Add INVISIBLE_SETTER 2021-10-03 17:10:06 +03: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 afb85026c4 Revert "[FIR] Implement INVISIBLE_SETTER"
This reverts commit b3d7ed56
2021-08-02 20:10:22 +03:00
Ivan Kochurkin b3d7ed569d [FIR] Implement INVISIBLE_SETTER 2021-07-30 18:07:34 +03:00
Andrey Zinovyev 9452b788bf [FIR] Implement CANNOT_OVERRIDE_INVISIBLE_MEMBER diagnostic 2021-07-08 18:13:46 +03:00
Dmitriy Novozhilov f7c68afb18 [FIR] Don't report EXPOSED_FUNCTION_RETURN_TYPE on property accessors 2021-07-02 15:55:12 +03:00
Mikhail Glukhikh 82b8cc333e FIR: introduce INVISIBLE_ABSTRACT_MEMBER_FROM_SUPER 2021-03-24 16:07:28 +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
Victor Petukhov fcfabb70d5 Report invisible setter error if it's resolved to synthetic property of base class with public getter and protected setter
^KT-11713 Fixed
2020-09-30 14:35:43 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Ilya Chernikov 808000e458 Implement warning when non-abstract classes containing abstract members invisible from that classes
#KT-27825 fixed
2019-11-12 19:08:53 +01:00