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
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
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
Dmitriy Novozhilov
62b774b2e3
[FE 1.0] Properly report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
...
^KT-38895
2021-11-16 13:29:12 +03:00
Nikolay Lunyak
2fb066e261
KT-47101: Fix companion supertypes
2021-11-15 13:22:38 +00:00
zhelenskiy
c1dc1f7e33
Diagnostics renamed
...
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru >
2021-11-13 12:38:45 +01:00
Ivan Kochurkin
15c83abfd8
[FIR] Throw UNCHECKED_CAST instead of NO_TYPE_ARGUMENTS_ON_RHS closer to FE 1.0
2021-11-12 15:20:48 +03:00
Ivan Kochurkin
5fda933c33
[FIR] Unify code of type unification, fix intersection types processing in FirCastDiagnosticsHelpers.kt
2021-11-12 15:20:47 +03:00
Ivan Kochurkin
a509e819b5
[FIR] Revert changes related to reporting WRONG_NUMBER_OF_TYPE_ARGUMENTS for type aliases
2021-11-12 15:20:46 +03:00
Ivan Kochurkin
d0a4ca199d
[FIR] Add UNCHECKED_CAST
...
Regenerate diagnostics code
2021-11-12 15:20:45 +03:00
Ivan Kochurkin
1fbccff1bd
[FIR] Rename isCastPossible to checkCasting, return CastingType instead of boolean
2021-11-12 15:20:45 +03:00
Ivan Kochurkin
2b5524b18f
[FIR] Add CAST_NEVER_SUCCEEDS
2021-11-12 15:20:44 +03:00
Ivan Kochurkin
291bc74676
[FIR] Add CANNOT_CHECK_FOR_ERASED
2021-11-12 15:20:43 +03:00
Ivan Kochurkin
e52a410599
[FIR] Initialize outer type parameters for local classes
2021-11-12 15:20:42 +03:00
Ivan Kochurkin
38820d3e41
[FIR] Implement WRONG_NUMBER_OF_TYPE_ARGUMENTS for top level type aliases
2021-11-12 15:20:42 +03:00
Ivan Kochurkin
d4a11fc295
[FIR] Disallow bare types for nested type arguments
...
Detect missing WRONG_NUMBER_OF_TYPE_ARGUMENTS
2021-11-12 15:20:40 +03:00
Denis.Zharkov
6e15ee8fea
FIR: Refine callable reference resolution in assignment position
...
synthetic_select<() -> T>(::foo) form allows to select better candidate
than synthetic_select(::foo) with expect type `() -> T`
2021-11-10 22:00:01 +03:00
Denis.Zharkov
65d7da122f
FIR: Fix invalid INITIALIZER_TYPE_MISMATCH for suspend lambda
2021-11-10 22:00:01 +03:00
Denis.Zharkov
994040c91c
FIR: Support invoke convention on super-qualified calls
2021-11-10 22:00:00 +03:00
Ivan Kochurkin
c9ad2b3bf9
[FIR] Ignore visited super types during bypass in FirInconsistentTypeParameterHelpers
...
Get rid of potential exponential complexity
2021-11-10 19:07:26 +03:00
Mads Ager
b79ca7d7df
[FIR] Allow annotation instantiation.
...
This commit disables the frontend error reporting for supported cases.
2021-11-09 23:51:48 +03:00
Ilya Kirillov
348403b1f3
FIR: do not inherit external modifier from super declaration
2021-11-08 19:01:35 +01:00
Nikolay Lunyak
4a3a621196
[FIR] Add isVisible check to resolveRootPartOfQualifier
2021-11-04 15:52:11 +00:00
Victor Petukhov
4118f3146b
Use proper isPlaceholder check for psi type references
2021-11-01 13:03:41 +03:00
Victor Petukhov
c8dea3db35
Add test for using underscored type in different positions
2021-11-01 13:03:40 +03:00
Victor Petukhov
d1acb09add
Report unsupported on using underscored type argument if the corresponding feature is disabled
2021-11-01 13:03:40 +03:00
Victor Petukhov
8a99aa4b42
[FIR] Don't build placeholder projection for types
2021-11-01 13:03:40 +03:00
Victor Petukhov
5508d40371
Put using underscored type arguments under a feature
2021-11-01 12:25:45 +03:00
Victor Petukhov
1073adbbf0
Report unsupported errors on annotations on underscored type arguments
2021-11-01 12:25:14 +03:00
Victor Petukhov
248c9550cd
Support type annotations resolution on an underscored type argument
2021-11-01 12:25:10 +03:00