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
Sergej Jaskiewicz
887e91328f
[JS IR] Allow value classes in external decls
...
Instances of value classes are passed unboxed, unless the instance is
nullable _and_ the value class wraps another nullable value.
#KT-43224 Fixed
2021-11-29 21:51:29 +00:00
Mikhail Glukhikh
2f1d415e4d
FE: report DECLARATION_CANT_BE_INLINED at 'inline' modifier
...
#KT-44022 Fixed
2021-11-28 11:31:51 +03:00
Denis.Zharkov
85e6c90052
FIR: Temporary adjust diagnostic tests
...
Elvis now is being resolved a bit differently and in case
of inconsistent types, the while expression has error type,
but no diagnostic is reported since the element has no valid source element
When one sets the source
https://github.com/JetBrains/kotlin/commit/817316cdc93457c1de7cf10c3b422e3a4b486e5b
it brings back the issue KT-45989 that was effectively unresolved but hidden
due to diagnostic loss
^KT-45989 Open
2021-11-26 19:39:52 +03:00
Denis.Zharkov
7eb758fab1
FIR: Avoid propagation of @Exact annotation through elvis
2021-11-26 19:39:52 +03:00
Denis.Zharkov
0d9ad62d4a
Fix inference for lambdas with with extension function expected type
...
^KT-49832 Fixed
^KT-49836 Fixed
2021-11-26 19:39:51 +03:00
Denis.Zharkov
c0a46eaefd
FIR: Fix inference of nullable unit lambda at RHS of elvis
2021-11-26 19:39:49 +03:00
Denis.Zharkov
46217318c0
FIR: Load final static constant Java fields as non-nullable
2021-11-26 19:39:48 +03:00
Denis.Zharkov
07440ee4a1
FIR: Fix incorrect inference errors for <expr>::class
...
Do not use outer expect type for <expr>
2021-11-26 19:39:46 +03:00
Denis.Zharkov
883b18a0c6
FIR: Preserve non-custom attributes after substitution
...
The test is being fixed since synthetic call for elvis has @Exact-attribute on return type
2021-11-26 19:39:45 +03:00
Denis.Zharkov
c0b6a593e0
FIR: Fix incorrect type of block generated for inc operator
...
Previously, it was obtained from expected type of a variable being assigned,
but it's better to use the type of resulting expression
Initially this part was brought in 4ab0897d7d ,
but as we see in commit message and tests it was all about unit-coercion
2021-11-26 19:39:38 +03:00
Denis.Zharkov
6f55d23bab
FIR: Support nested light classes
2021-11-26 19:39:31 +03:00
pyos
a1be855d17
FIR: thread control flow through anonymous object init blocks
...
^KT-39646 Fixed
2021-11-26 14:21:29 +03: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
330574cab6
[FIR] Properly support smartcasts on stable when subjects in when conditions
...
^KT-49860 Fixed
2021-11-26 11:26:21 +03:00
Dmitriy Novozhilov
8707be51c9
[FIR] Report errors about invisible types from type resolution
2021-11-26 11:26:17 +03:00
Dmitriy Novozhilov
f2c319c4ae
[FIR] Add ability to safe proper ConeKotlinType in FirErrorTypeRef
...
This is needed for cases when some type ref is resolved to proper type
but has some diagnostic (e.g. this type is invisible)
2021-11-26 11:26:16 +03:00
Ivan Kochurkin
f046f2964b
[FIR] Add PLATFORM_CLASS_MAPPED_TO_KOTLIN
2021-11-24 23:13:41 +03:00
Ivan Kochurkin
51b73bb6ae
[FIR] Add REDUNDANT_NULLABLE diagnostics
2021-11-24 23:13:40 +03:00
Ivan Kochurkin
4caf3c5e83
[FIR] Add NOT_A_CLASS diagnostics
2021-11-24 23:13:40 +03:00
Ivan Kochurkin
3beb447e85
[FIR] Consider anonymous object declarations in classDeclarationsStack in transformers
2021-11-24 23:13:38 +03:00
Ivan Kochurkin
2241887b8f
[FIR] Drop RESOLVED_TO_UNDERSCORE_NAMED_CATCH_PARAMETER, always resolve to UNRESOLVED_REFERENCE
2021-11-24 23:13:35 +03:00
Dmitriy Novozhilov
9807c67ae4
[FIR] Properly collect overriddens for method enhancement
...
If some java class has multiple supertypes then we need to collect
overriddens from all those types directly, even if superTypeScope
(which is FirTypeIntersectionScope in this case) returns only
one symbol from one of this types (not intersection one)
This is needed to proper enhancement in cases when some type occurs
multiple times in supertypes graph with different nullability
of arguments:
class ConcurrentHashMap<K, V> : AbstractMap<K!, V!>, MutableMap<K, V>
If we try to find method `get(key: K): V` supertype scope returns
`AbstractMap.get(key: K!): V!` (because it actually overrides
`MutableMap(key: K): V?`), but we need to get both symbols to
properly enhance types for `ConcurrentHashMap.remove`
2021-11-22 17:01:17 +03:00
Ilya Goncharov
24bc1fe1b4
[JS IR] Add test with extending exported interface
2021-11-22 12:40:28 +00:00
Ilya Goncharov
6f3985be47
[JS IR] Add test on frontend check with enum exportness
...
^KT-49754 fixed
2021-11-22 12:40:28 +00:00
Victor Petukhov
a6fd14d4e6
[FE 1.0] Eliminate resolution ambiguity on inherited SAM-interfaces
...
^KT-17765 Fixed
2021-11-22 14:18:30 +03:00
Victor Petukhov
a5c6d370dd
[FE 1.0] Eliminate resolution ambiguity with external type parameters
...
^KT-10926 Fixed
2021-11-22 14:18:29 +03:00
Victor Petukhov
5c3835ab39
[FE 1.0] Don't use identifier in WhenMissingCase.kt if it wasn't provided
...
^KT-49702 Fixed
2021-11-22 10:44:06 +03:00
Victor Petukhov
42805db989
[FE 1.0] Take into account import aliases during hidden member resolution
2021-11-22 10:43:43 +03:00
Dmitriy Novozhilov
da02d25278
[FE 1.0] Implement deprecation warning for private constructors of sealed classes
...
^KT-44866
^KT-49729 Fixed
2021-11-18 13:54:05 +03:00
Artem Kobzar
d5dd35cb20
feat(@JsExport for interfaces): add ability to export interfaces in TypeScript.
2021-11-18 10:07:38 +00:00
Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Ivan Kochurkin
f05436b939
[FIR] Fix false positive case of CANNOT_CHECK_FOR_ERASED
...
Restore CANNOT_CHECK_FOR_ERASED as error
2021-11-16 18:15:49 +03:00