Mikhail Glukhikh
533e802c8d
FIR: support JVM_DEFAULT_WITH_COMPATIBILITY_* diagnostics (FE 1.0 sync)
2021-12-09 13:26:40 +03:00
Mikhail Glukhikh
178290eac3
FIR: drop JVM_DEFAULT_THROUGH_INHERITANCE diagnostic (FE 1.0 sync)
2021-12-09 13:26:39 +03: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
Ilmir Usmanov
f95cba0ec3
Support delegation by interface for inline classes in FIR
...
#KT-27435 Fixed
2021-12-08 00:11:55 +01:00
Ilmir Usmanov
bb53ba4a2e
Enable delegation by interface for inline classes in old FE
...
#KT-27435
2021-12-08 00:11:54 +01:00
Mikhail Glukhikh
852475337b
FIR: use only most specific members when building intersection
...
In this commit we drop less concrete members in intersection.
See for example change in test data: before the commit, we intersected
all three A.foo, B.foo and C.foo in diamond hierarchy. After the commit
we drop A.foo and intersect B.foo and C.foo only.
2021-12-07 23:17:20 +03:00
Victor Petukhov
7475d26902
[FE 1.0] Implement checker to detect changed resolve for progressions and ranges due to the start of implementing Collection<T>
...
^KT-49276 Fixed
2021-12-07 18:48:27 +03:00
Mikhael Bogdanov
a2395ec8bb
Additional diagnostics for @JvmDefaultWithCompatibility
2021-12-06 14:20:25 +01:00
Anastasiya Shadrina
4d3035e2f7
[Parser] Do not support local contextual declarations
2021-12-03 20:22:17 +03:00
Dmitriy Novozhilov
1f0b62b25f
[FIR] Add smartcasts from == if equals is from Any
...
^KT-49127 Fixed
2021-12-03 14:19:25 +03:00
Mikhael Bogdanov
c0ffbe03c6
Remove '-Xjvm-default-allow-non-default-inheritance' flag. Enable such inheritance by default
...
#KT-47000 Fixed
2021-12-03 06:39:38 +01:00
Anastasiya Shadrina
2d088196ce
[FE] Fill DESCRIPTOR_TO_CONTEXT_RECEIVER_MAP only with CR enabled
2021-12-02 20:25:06 +03:00
Anastasiya Shadrina
9e2271399e
[FE] Render context receivers for functions, properties, and classes
2021-12-02 20:25:05 +03:00
Anastasiya Shadrina
2b30c1eb5d
[FE] Do not change original semantics in LabelResolver
2021-12-02 20:25:00 +03:00
Anastasiya Shadrina
5d76f979cf
[Tests] Minor: add FIR_IDENTICAL to typeParameterAsContextReceiver.kt
2021-12-02 20:24:59 +03:00
Anastasiya Shadrina
a70036c945
[Tests] Add a test with type parameter as a context receiver
2021-12-02 20:24:58 +03:00
Anastasiya Shadrina
752bc299f1
[FE, Tests] Passing context(A, B) where context(B, A) expected
2021-12-02 20:24:56 +03:00
Anastasiya Shadrina
ac27fda965
[FE] Report ambiguity when label can refer to multiple receivers
2021-12-02 20:24:44 +03:00
Anastasiya Shadrina
7ab9b68ad5
[FE] Move type-related checks to TypeResolver
2021-12-02 20:24:41 +03:00
Anastasiya Shadrina
c59ed6344e
[Tests] Make build green again
2021-12-02 20:24:31 +03:00
Anastasiya Shadrina
b3591e77be
[FE] Prohibit explicit @ContextFunctionTypeParams usage
2021-12-02 20:24:20 +03:00
Anastasiya Shadrina
a091b345a0
[FE] Provide overloadability for candidates with different CR
2021-12-02 20:24:19 +03:00
Anastasiya Shadrina
910660a083
[FE] Add language feature for context receivers
2021-12-02 20:24:16 +03:00
Anastasiya Shadrina
369c86ebb0
[FE] Fix contextual functional types rendering
2021-12-02 20:24:16 +03:00
Anastasiya Shadrina
7fce2691e2
[FE] Allow lambda argument cast to contextual functional type
2021-12-02 20:24:15 +03:00
Anastasiya Shadrina
d8faa9686d
[Tests] Test samples from KEEP
2021-12-02 20:24:14 +03:00
Anastasiya Shadrina
b0a7be72e8
[Tests] Add missing and fix incorrect
2021-12-02 20:24:13 +03:00
Anastasiya Shadrina
16b976f0e0
[FE] Support functional literals with context receivers
2021-12-02 20:24:11 +03:00
Anastasiya Shadrina
e3f987459c
[PSI, FE] Support functional types
2021-12-02 20:24:11 +03:00
Anastasiya Shadrina
e53cee77a3
[FE] Support multiple candidates for extension receiver
2021-12-02 20:24:10 +03:00
Anastasiya Shadrina
f9e6365461
[Tests] Make build green again
2021-12-02 20:24:07 +03:00
Anastasiya Shadrina
f427265739
[FE] Resolve overload conflict between contextual and non-contextual declarations
2021-12-02 20:24:03 +03:00
Anastasiya Shadrina
7fd5034cd6
[FE] Minor: fix typo
2021-12-02 20:24:01 +03:00
Anastasiya Shadrina
2d743a2455
[FE] Add case with ambiguous generic call
2021-12-02 20:24:01 +03:00
Anastasiya Shadrina
814777ba8c
[FE] Report ambiguity in all possible cases
2021-12-02 20:23:58 +03:00
Anastasiya Shadrina
37495bcba0
[FE] Change resolution scheme
2021-12-02 20:23:57 +03:00
Anastasiya Shadrina
1f6746dc74
[FE] Relax the "no subtyping between context receivers" limitation
2021-12-02 20:23:56 +03:00
Anastasiya Shadrina
bfd20e1890
[FE] Move context receivers checks to the separate resolution part
2021-12-02 20:23:56 +03:00
Anastasiya Shadrina
875f4ea31c
[FE] Support local contextual declarations
2021-12-02 20:23:54 +03:00
Anastasiya Shadrina
1a0aab4a44
[FE] Inline classes cannot have context receivers
2021-12-02 20:23:52 +03:00
Anastasiya Shadrina
d704862582
[FE] Prohibit property initializers with context receivers
2021-12-02 20:23:51 +03:00
Anastasiya Shadrina
5e426d5c16
[Parser] Continue parsing if context receiver is not parsed correctly
2021-12-02 20:23:48 +03:00
Anastasiya Shadrina
1bcaeabd84
[PSI, FE, PSI2IR] Use labels for referencing specific receiver
2021-12-02 20:23:40 +03:00
Anastasiya Shadrina
f4ddf66ac4
[FE] Support context receivers on classes
2021-12-02 20:23:25 +03:00
Anastasiya Shadrina
c34fe8d547
[FE] Implement temporary resolution algorithm
2021-12-02 20:23:24 +03:00
Anastasiya Shadrina
d923c95671
[FE] Add context receivers to scope
2021-12-02 20:23:22 +03:00
Sergej Jaskiewicz
599f705842
[stdlib] Make @LowPriorityInOverloadResolution applicable to ctors
2021-12-02 12:39:40 +00:00
Tianyu Geng
18f7a760bb
FIR checker: report unresolved reference in imports
...
Compared to FE1.0, instead of using UNRESOLVED_REFERENCE, a new
UNRESOLVED_IMPORT diagnostic is introduced. This is so that we can use a
different positioning strategy to highlight the last part of the import
if the entire import is passed.
Also, this change fixed some incorrectly rejected imports in FIR. Such
cases are covered the newly added test file staticFunAndPropertyImport.kt
2021-12-01 23:45:18 +03:00