Victor Petukhov
42805db989
[FE 1.0] Take into account import aliases during hidden member resolution
2021-11-22 10:43:43 +03:00
Dmitry Petrov
e525e25518
JVM KT-47851 fix redundant checkcast elimination
2021-11-20 23:29:19 +03:00
Dmitry Petrov
8b066fd345
JVM add tests for KT-49615
2021-11-20 23:29:18 +03:00
Ilya Chernikov
cad57e693f
FIR: introduce declaration origin for binary classes from source module
...
in particular for incremental compilation when module is only partially
recompiled.
#KT-49750 fixed
2021-11-19 08:36:15 +01:00
Roman Artemev
e4585730d6
[IR] Add platform-agnostic builtin to throw linkage error
2021-11-19 01:16:33 +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
Dmitry Petrov
30ceb49442
JVM_IR KT-48945 generate special bridge with unsubstituted signature
2021-11-17 17:44:01 +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
Alexander Udalov
850d76f6bf
Remove error on annotated types as arguments to typeOf
...
Instead, document that `KType.annotations` returns an empty list for
types created with `typeOf`. Annotations might be supported in the
future.
#KT-49573 Fixed
#KT-29919
2021-11-16 15:02:50 +01:00
Dmitriy Novozhilov
2aa027639c
[FIR] Fix access to fields from super class
...
^KT-49654 Fixed
2021-11-16 15:48:08 +03:00
Dmitriy Novozhilov
e7c9d76163
[FIR] Use SupertypeSupplier in type resolver for calculating supertypes
...
This is needed to avoid problems with checking visibility of types which
are used in supertypes during supertypes resolution in IDE, when
supertypes of some class can be already computed, but not saved in
class itself, but still lay in supertypeComputationSession
There were 4 failing tests before this changes (all in
`DiagnosisCompilerTestFE10TestdataTestGenerated$Tests$Exposed`):
- testInternal
- testInternalAndProtected
- testProtected
- testProtectedSameWay
2021-11-16 15:48:07 +03:00
Dmitriy Novozhilov
499b97d51e
[FIR] Fix setting file in supertypes resolution
...
^KT-49652 Fixed
2021-11-16 15:48:06 +03:00
Mikhail Glukhikh
fb859c0270
FIR: add error messages for new inference errors
2021-11-16 14:18:25 +03:00
Mikhail Glukhikh
4ad790874e
Drop empty FirDefaultErrorMessages.kt
2021-11-16 14:18:25 +03:00
Ivan Kochurkin
6ec0d94f1d
[FIR] Temporary convert CANNOT_CHECK_FOR_ERASED to warning
2021-11-16 01:07:37 +03:00
Roman Golyshev
b40592fcf3
Rename some functions in FirAbstractAnnotationResolveTransformer
...
Also add a kdoc for them
2021-11-15 17:01:35 +03:00
Nikolay Lunyak
2fb066e261
KT-47101: Fix companion supertypes
2021-11-15 13:22:38 +00:00
Roman Golyshev
4f52ab6ba1
Add kdoc for FirPredicateBasedProvider::fileHasPluginAnnotations
2021-11-15 16:02:55 +03:00
Tianyu Geng
1c8d1fcdba
FIR Tree: make FirDefaultPropertyAccessor propagate dispatchReceiverType
...
Custom property accessor has this property set and hence it make sense
for the default accessor to have it too. Also, FE1.0's counterpart
has this bit set and it's returned through the analysis API.
2021-11-15 11:10:46 +03:00
Steven Schäfer
a6dae0b37b
JVM IR: Fix value class mangling in SAM wrappers from different modules
...
KT-49659
2021-11-14 21:52:39 +01:00
Ilmir Usmanov
b7d88be41a
Regenerate FIR diagnostics-related files
2021-11-13 12:38:49 +01: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
87eb02a9e0
[FIR] Add error messages for CANNOT_CHECK_FOR_ERASED, CAST_NEVER_SUCCEEDS, UNCHECKED_CAST
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
98cce8e05b
[FIR] Support of intersection types in bareTypes.doUnify ^KT-48832 Fixed
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
05b91d37a7
[FIR] Fix collection of annotations for assigment expressions
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
4ca757446a
[FIR] Add getCorrespondingPlatformClass, getCorrespondingKotlinClass methods to FirPlatformClassMapper
2021-11-12 15:20:43 +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
09510633c7
[FIR] Rename applyToActualCapturedTypeParameters to appendOuterTypeParameters
2021-11-12 15:20:41 +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
Mikhail Glukhikh
d6bc6bec59
FIR2IR: read extension function type attribute properly
2021-11-12 12:53:32 +03:00
Mikhail Glukhikh
b2d020606e
FIR: don't generate extension callable reference without receiver
2021-11-12 12:53:29 +03:00
Mikhail Glukhikh
bcfd970ac5
FIR2IR: add comments about translation phases
2021-11-12 12:53:25 +03:00
Mikhail Glukhikh
d91384434c
Drop some unnecessary casts in FIR code
2021-11-12 12:53:22 +03:00
Mikhail Glukhikh
3263d4d003
FIR2IR: split local class on-the-fly creation into two phases
2021-11-12 12:53:19 +03:00
Alexander Udalov
27cfcb9b3d
IR: fix thisReceiver parameter type for function classes
...
Incorrect builder was used at line 269, which led to non-sensible type
in `IrClass.thisReceiver` for function types, such as
`SuspendFunction1<SuspendFunction1, SuspendFunction1>` in the linked
issue.
Avoid creating types manually completely to simplify this code and fix
the bug.
#KT-49168 Fixed
2021-11-10 21:58:41 +01: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
Dmitry Petrov
916379c0e7
JVM KT-49613 use adapter for indy reference to protected constructor
2021-11-10 19:37:27 +03:00
Dmitry Petrov
76bdf4ff1a
JVM KT-49548 extra test
2021-11-10 19:37:25 +03:00
Dmitry Petrov
9a4cff0dc7
JVM KT-49548 progression iterators can be tainted
2021-11-10 19:37:24 +03:00