Commit Graph

20 Commits

Author SHA1 Message Date
Nikolay Lunyak 22fc90e5a1 [FIR] Treat properties from ObjC-classes as abstract
In short, the problem is some
platform libraries contain invalid
Kotlin code. Specifically,
some classes may inherit multiple
members with default
implementations, but do not define
an explicit override, like `UIView.bounds`.

Since we can't refactor platrofm
libraries just now, we want to
treat such properties as abstract.

^KT-65866 Fixed
^KT-65855
2024-02-26 10:06:26 +00:00
Nikolay Lunyak da6006b7d0 [FIR] Relax intersection overrides visibility requirements for Java
Allow multiple bases with default
implementations as long as there's a
non-abstract symbol from a class.

Our rules for Kotlin are stricter than
those in Java.
2024-02-21 20:24:13 +00:00
Pavel Kunyavskiy 6e8a7d4662 [ObjCInterop] Implement @ObjCSignatureOverride
This annotation leads to conflicting overloads error supression,
in case where several function with the same argument types,
but different argument names are inherited from ObjC class.

We need to implement it in both K1 and K2 to make the IDE experience
better.
But the annotation itself wouldn't be available in K1.

    ^KT-61323
2024-02-14 11:44:01 +00:00
Simon Ogorodnik 53e89a9722 K2. Minor. Rename FirConstExpression to FirLiteralExpression
FirConstExpression is usually confused with "constant" calculations,
while in fact, it just denotes a simple literal expression
and `1 + 1` isn't represented by a FirConstExpression.

^KT-64314 Fixed
2024-01-25 23:05:15 +00:00
Vladimir Sukharev 117ce133bf [K/N] Remove platform-dependent overridability check for properties
^KT-57640 Fixed
2024-01-18 18:43:08 +00:00
Nikolay Lunyak 3afed72027 [FIR] Remove symbol.fir from FirNativeObjCOverrideInitChecker 2024-01-16 14:18:09 +00:00
Vladimir Sukharev 38ea2ce973 [K/N] Don't use assert in production code 2024-01-16 09:39:16 +00:00
Vladimir Sukharev 07938205bc [FIR][K/N] Get rid of SymbolInternals in FirObjCInterop 2024-01-16 09:39:16 +00:00
Vladimir Sukharev e109cac719 [FIR][K/N] Reduce use FIR internals usage in FirObjCInterop
^KT-61564
2024-01-16 09:39:15 +00:00
Vladimir Sukharev 55a41961d3 [FIR][K/N] Don't use FIR internals in FirNativeObjCOverrideInitChecker
^KT-61564
2024-01-16 09:39:15 +00:00
Vladimir Sukharev dbba6d09ff [K/N] Implement FirNativeObjCOverrideInitChecker
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 4a97db82b3 [K/N] Fix local class handling for FirLightTreeNativeIrTextTestGenerated.FirProblems.testInnerClassInAnonymous
Reason: ClassId.toSymbol(session) cannot be used for local classes.

^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev c5aed2b094 [K/N] Implement FirNativeObjCOutletChecker and FirNativeObjCActionChecker
^KT-61564
2024-01-09 14:17:47 +00:00
Ivan Kochurkin 115d685d91 [FIR] Fix ambiguity of Throws and other std annotations importing
Including `SharedImmutable` and `ThreadLocal`

Simplify code, remove `DefaultImportPriority.KOTLIN_THROWS`

Introduce `FirNativeClassMapper`
2023-11-23 23:51:23 +00:00
Vladimir Sukharev 4d4ad6c0d8 [K/N] Fix K2 ObjC interop: Fields are not supported for Companion of subclass of ObjC type
^KT-63048
2023-11-07 18:51:10 +00:00
Pavel Kunyavskiy 156c341eeb [K/N] Implement objc overridablity condition for IR
^KT-61511
2023-10-13 08:15:01 +00:00
Vladimir Sukharev cd4c241fa3 [K/N] Run irText tests for K2/Native
^KT-58240
2023-10-04 18:20:05 +00:00
Sergej Jaskiewicz e3b5dc509c [K/N] De-duplicate code for mangling objc interop function names
Extract the duplicated functionality to the
`ObjCFunctionNameMangleComputer` class.
2023-09-13 14:25:11 +00:00
Sergej Jaskiewicz 0fd4f10f6c [K/N] Avoid magic strings in KonanMangler 2023-09-13 14:25:10 +00:00
Pavel Kunyavskiy 8bcd1f4efa [FIR/Native] Move fir-related code from backend.native module to new one
^KT-61249
2023-08-22 08:56:16 +00:00