Mikhail Glukhikh
a02cf76d6c
K2: build SAM-based function type for a given captured type properly
...
Before this commit, we assumed (erroneously) that a captured type
cannot have an associated SAM-based function type.
In this commit we changed this assumption, replacing a captured type
with its lower type for this purpose
#KT-63379 Fixed
2023-12-21 10:19:23 +00:00
Mikhail Glukhikh
8588588760
K2: add test reproducing KT-63379
2023-12-21 10:19:23 +00:00
Mikhail Glukhikh
0fba58eee7
K2: repeat K1 logic around SAM-based candidates discrimination
...
#KT-56614 Fixed
2023-11-16 20:12:34 +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
Kirill Rakhman
1f0d56e157
[FIR] Make type parameters inaccessible for non-inner nested types
...
#KT-57209
2023-03-28 13:20:53 +00:00
Mikhail Glukhikh
32a73968de
Stop tower resolve in K2 in more similar manner with K1
2022-07-27 15:29:41 +00:00
Victor Petukhov
42e71f8c53
Remove explicit enabling the new type inference from test data
2022-07-22 16:03:52 +00:00
Alexander Udalov
349c17786e
Fix missing error on fun interface constructor reference
...
#KT-51843 Fixed
2022-04-08 14:02:14 +02:00
Victor Petukhov
27fa632630
[FE 1.0] Update test data with new error type representation
2022-03-23 21:13:33 +00:00
Dmitry Petrov
e5eee9bab9
KT-47939 KotlinFunInterfaceConstructorReference is experimental
2021-12-08 14:12:40 +03:00
Dmitry Petrov
50b0dae786
KT-47939 fixes after review
2021-12-08 14:12:37 +03:00
Dmitry Petrov
1fd0dec5e7
FE KT-47939 callable references to functional interface constructors
...
Allow callable references to Kotlin 'fun interface' constructors.
Prohibit callable references to Java SAM interface constructors.
2021-12-08 14:12:33 +03:00
Ivan Kochurkin
7e7066d75e
[FIR] Add FUNCTION_DELEGATE_MEMBER_NAME_CLASH
2021-09-13 20:48:59 +03:00
Ivan Kochurkin
84c5f58cab
[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
2021-08-25 21:53:23 +00:00
Ivan Kochurkin
d4e1cded59
[FIR] Implement RESOLUTION_TO_CLASSIFIER
2021-07-28 23:18:38 +03:00
Mikhail Glukhikh
5c224ad17c
FIR: fix positioning in fun interface checker
2021-04-23 17:29:34 +03:00
Артём
393a19db54
FIR: introduce FunInterfaceDeclarationChecker
2021-04-23 17:29:25 +03:00
Mikhail Glukhikh
51d348d5fa
FIR: report FUN_INTERFACE_CONSTRUCTOR_REFERENCE on deserialized properly
...
This fixes KT-46100 for FIR
2021-04-15 15:54:18 +03:00
ebukreev
d8a2f82cbd
FIR: inroduce FirFunInterfaceConstructorReferenceChecker
2021-04-14 19:53:43 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +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
Mikhail Glukhikh
4b823eca21
Fix test data (FIR_IDENTICAL)
2021-01-29 16:54:17 +03:00
Dmitriy Novozhilov
299272fa6d
[Test] Update diagnostics testdata according to allowed suspend fun interfaces
2021-01-28 13:19:33 +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
Mikhail Glukhikh
3dec848c03
[FIR] Implement light tree DECLARATION_NAME & SIGNATURE strategies
2020-11-26 08:37:47 +03:00
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Dmitriy Novozhilov
67b262aa34
[FIR] Move tracking candidate applicability from CheckerSink to Candidate
2020-11-11 09:52:56 +03:00
Mikhail Zarechenskiy
e49cdf0ca2
Prohibit using suspend functions as SAM in fun interfaces
...
#KT-40978 Fixed
2020-08-10 22:04:16 +03:00
Nick
26e3a111d6
[FIR] Add diagnostics for object related problems
2020-07-31 19:34:55 +03:00
Dmitriy Novozhilov
58af8d68a1
[FIR] Check for isFun flag in SAM resolution
2020-07-08 12:13:32 +03:00
Mikhail Zarechenskiy
bc40669598
Prohibit functional interface constructor references
...
#KT-36706 Fixed
2020-06-26 14:03:47 +03:00
Mikhail Zarechenskiy
6c5806f971
Add test for obsolete issue
...
#KT-38161 Obsolete
2020-06-05 16:30:08 +03:00
Mikhail Zarechenskiy
f073e34926
Update forgotten test-data
2020-06-01 15:35:24 +03:00
Mikhail Zarechenskiy
01de789c76
Add compatibility warning for SAM conversions on Kotlin functions
2020-06-01 10:19:32 +03:00
Mikhail Zarechenskiy
1a26d2e157
Fix exception during resolution of incorrect fun interface
...
#KT-37541 Fixed
2020-04-29 14:15:25 +03:00
Alexander Udalov
b77e5a21ec
Report error if fun interface method has JVM name getFunctionDelegate
...
This is needed so that it wouldn't clash with the corresponding member
from the kotlin/jvm/internal/FunctionAdapter interface, which all fun
interface wrappers will implement to get proper equals/hashCode. The
workaround is to rename the fun interface method.
#KT-33455
2020-04-29 12:15:50 +02:00
Mikhail Glukhikh
8884cbe415
Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
2020-03-05 09:39:40 +03:00
Mikhail Zarechenskiy
a736551c2a
Add test checking that fun isn't inherited from base interface
2020-02-12 10:36:40 +03:00
Mikhail Zarechenskiy
45bbdaf73f
Add base declaration checker for fun interfaces
2020-02-12 10:36:39 +03:00
Mikhail Zarechenskiy
58c235e722
Set up tests for fun interfaces for JVM backend for now
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
76a78fe918
FIC: render fun before interfaces in descriptor renderer
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
8350cf7d14
FIC: rename FunctionConversion -> FunctionalConversion
2020-01-17 19:37:47 +03:00
Mikhail Zarechenskiy
b98d8bd7c1
Regenerate tests after rebase on master, add FIR tests
2020-01-17 19:36:11 +03:00
Mikhail Zarechenskiy
fc32e8b017
FIC: Add synthetic constructors for fun interfaces aka explicit FIC
2020-01-17 19:36:05 +03:00
Mikhail Zarechenskiy
0f242a9931
FIC: Support conversions for suspend functions
2020-01-17 19:36:04 +03:00
Mikhail Zarechenskiy
f43769c50d
FIC: Add diagnostic tests
2020-01-17 19:36:03 +03:00
Mikhail Zarechenskiy
c71c1d45c6
FIC: Make SAM conversions also for fun interfaces, add base test
2020-01-17 19:36:01 +03:00
Mikhail Zarechenskiy
55935cc98a
FIC: introduce language feature, modifiers checks and basic tests
2020-01-17 19:36:00 +03:00