Ivan Kylchik
ca1932b3a5
Set proper fir type for deserialized annotation's arguments
2021-06-07 15:35:03 +03:00
Ivan Kylchik
d578aa0ec5
Pass irFile in interpreter method in IrConstTransformer
2021-06-07 15:34:35 +03:00
Ivan Kylchik
1151c6177b
Move IrCompileTimeChecker to separate checker package
2021-06-07 15:33:37 +03:00
Denis.Zharkov
592256976e
FIR: Fix inference of builder-inference function from expect type
...
Previously, such calls were being completed with FULL mode and incorrect
INFERENCE_NO_INFORMATION_FOR_PARAMETER has been reported
2021-06-07 15:25:57 +03:00
Denis.Zharkov
18e93b50d9
FIR: Fix loading read-only collection Java types with incorrect variance
2021-06-07 15:25:56 +03:00
Denis.Zharkov
5ade831665
FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion
...
^KT-46996 Fixed
2021-06-07 15:25:55 +03:00
Denis.Zharkov
d932d5b0a5
FIR: Support adding expect type to calls in foo() as R position
...
See https://kotlinlang.org/docs/whatsnew12.html#support-for-foo-as-a-shorthand-for-this-foo
2021-06-07 15:25:51 +03:00
Denis.Zharkov
6136526a3a
FIR: Avoid reporting inference errors from DelegatedPropertyConstraintPosition
...
All necessary diagnostics have already been reported through the checkers
2021-06-07 15:25:50 +03:00
Denis.Zharkov
43f3fe1ebe
FIR: Avoid missing errors during delegation resolution
...
Merge inference errors from delegation partially resolved calls to the main system
2021-06-07 15:25:49 +03:00
Denis.Zharkov
0aca3a3737
FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See previous commits for details
2021-06-07 15:25:47 +03:00
Denis.Zharkov
c420957eac
FIR: Report INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2021-06-07 15:25:45 +03:00
pyos
0bd8d16fe2
JVM_IR: fix Result types in continuations & remove more codegen hacks
...
#KT-47129 Fixed
2021-06-07 09:57:42 +02:00
Dmitry Petrov
7fd033adae
JVM_IR KT-47073 use type parameter upper bound for default value
2021-06-04 20:54:01 +03:00
Ivan Kochurkin
c4c2fbb5a0
[FIR] Implement RECURSIVE_TYPEALIAS_EXPANSION, CYCLIC_INHERITANCE_HIERARCHY diagnostics, fix stackoverlow exception in case if typealias points to type with type arguments
2021-06-03 20:41:58 +03:00
Mark Punzalan
d1531f9cdd
FIR: Choose a resolved candidate for augmented assignment when both
...
assign and operator candidates are unsuccessful.
2021-06-03 20:18:04 +03:00
Mark Punzalan
32bb64a225
FIR: Report UNSAFE_OPERATOR_CALL for augmented assignments (was
...
reporting UNSAFE_CALL).
2021-06-03 20:18:03 +03:00
Mark Punzalan
6de1000818
FIR: Report UNSAFE_INFIX_CALL for all infix-style calls, even if the
...
candidate is not an infix function.
This mirrors FE 1.0 (see
`AbstractTracingStrategy.reportUnsafeCallOnBinaryExpression()`) and
allows consistent handling for quickfixes on infix calls.
2021-06-03 20:18:01 +03:00
Ilya Kirillov
c998d0f026
FIR: make FirStaticScope to be name aware
2021-06-03 19:38:47 +03:00
Ilya Kirillov
6b450e6fdf
FIR: make FirOnlyClassifiersScope/FirOnlyCallablesScope to be name aware
2021-06-03 19:38:29 +03:00
Victor Petukhov
1e5998e0ba
Add constraints between two different stub variables instead of creating constraint error due to T1 isn't subtype of T2
...
^KT-44241 Fixed
2021-06-03 19:18:09 +03:00
Ivan Kochurkin
da15f0ffe8
[FIR] Consider fullyExpandedType instead of original type in isSubtypeForTypeMismatch, consider lookupTag in isError method
2021-06-03 18:24:36 +03:00
Ivan Kochurkin
0b0a96a1d3
[FIR] Fix processing of nested type arguments, extract extractTypeRefAndSourceFromTypeArgument method to FirHelpers and use it from FirClassVarianceChecker and FirConflictingProjectionChecker
2021-06-03 18:24:35 +03:00
Ivan Kochurkin
f081a6b4fa
[FIR] Implement REDUNDANT_PROJECTION diagnostics, rename FirConflictingProjectionChecker -> FirProjectionRelationChecker, fix tests
2021-06-03 18:24:34 +03:00
Ivan Kochurkin
03e577bf98
[FIR] Implement CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION diagnostics, fix tests
2021-06-03 18:24:32 +03:00
Ivan Kochurkin
ca970f0a8b
[FIR] Add ConeKotlinTypeConflictingProjection, return it from substituteArgument instead of ConeStarProjection in appropriate cases, remove plus operator from ProjectionKind
2021-06-03 18:24:30 +03:00
Ivan Kochurkin
b85846c0c0
[FIR] Fix location for CONFLICTING_PROJECTION diagnostics, extend conflictingProjection.kt with test sample
2021-06-03 18:24:29 +03:00
Victor Petukhov
19c07e048a
Don't check suitability of a builder inference call if unrestricted builder inference is enabled
...
^KT-42139 Fixed
2021-06-03 17:28:40 +03:00
Mikhail Glukhikh
2bf0e6744d
FIR2IR: optimize coerceToUnitIfNeeded in implicit cast inserter
2021-06-03 16:14:42 +03:00
Mikhail Glukhikh
13d91837be
FIR: cache functional type symbols in type resolver
2021-06-03 16:14:42 +03:00
Mikhail Glukhikh
1294c8de53
FIR: don't get class symbol if it's unnecessary (Java type conversion)
2021-06-03 16:14:41 +03:00
Victor Petukhov
124a14c8df
Use separate constraint position during call substitution as part of inferring postponed type variables
...
^KT-47052 Fixed
^KT-47082 Fixed
2021-06-03 12:37:17 +03:00
pyos
d5d3d9f112
Add regression tests for KT-46890 and other stuff
2021-06-03 12:35:25 +03:00
Dmitriy Novozhilov
6f54e9fd5c
Revert "FIR: add smartcast stability to FIR"
...
This reverts commit 96bd2c54
2021-06-03 09:54:02 +03:00
Dmitriy Novozhilov
0497f60af3
Revert "FIR DFA: store stability in RealVariable"
...
This reverts commit 62f7e8f7
2021-06-03 09:53:57 +03:00
Dmitriy Novozhilov
796f8e6bce
Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
...
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00
Ilya Kirillov
948d9390d6
FIR: "//TODO make thread safe" comment from FirBuiltinSymbolProvider
2021-06-03 00:09:03 +03:00
Ilya Kirillov
f361312e45
FIR: use FirCachesFactory in BuiltInsPackageFragment.tryGetSyntheticFunctionalInterface
2021-06-03 00:09:02 +03:00
Ilya Kirillov
ba2315430b
FIR: get rid of lateinit var in FirBuiltinSymbolProvider for thread safety
2021-06-03 00:09:01 +03:00
Ilya Kirillov
863156679d
FIR: use FirCachesFactory in BuiltInsPackageFragment.getClassLikeSymbolByFqName
2021-06-03 00:09:00 +03:00
Dmitry Petrov
7a43c2de79
JVM remove dead code during constant condition elimination
...
This avoids an extra call to 'analyze', which is rather costly.
Update debugger testData: Constant condition
elimination now performs DCE more consistently.
2021-06-03 00:08:27 +03:00
Mads Ager
0b5ec5535c
[JVM_IR] Add String.plus(Any) to intrinsics list.
...
This filters it out for use in SAM wrapper generation with
invoke-dynamic.
The intrinsic is not actually used for code generation so
it is added to the list of intrinsics that should have been
lowered away before codegen.
^KT-45779 Fixed
2021-06-03 00:04:47 +03:00
Tianyu Geng
84334b087c
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-02 13:19:12 +03:00
Tianyu Geng
62f7e8f71f
FIR DFA: store stability in RealVariable
...
As part of this change, we also extend the usage of RealVariable in more
places during DFA. Now mutable properties, property with custom getters,
delegated properties, etc are also treatd as a `RealVariable`. In
general this is needed in order to carry out smartcast computation in
order to report `SMARTCAST_IMPOSSIBLE`. It seems to also have side
effects that improves behavior of some test files.
2021-06-02 13:19:12 +03:00
Tianyu Geng
96bd2c54f0
FIR: add smartcast stability to FIR
2021-06-02 13:19:12 +03:00
Tianyu Geng
931a637bdd
FIR: use isReal() and isSynthetic() helper consistently
2021-06-02 13:19:11 +03:00
Mads Ager
f846dd8ea2
[JVM_IR] Avoid using special names in static inline class replacements.
...
Fixes KT-46952
2021-06-01 16:22:14 +02:00
Mikhael Bogdanov
b72aa76415
Support class type parameters annotation checking
2021-06-01 06:33:51 +02:00
Mikhael Bogdanov
a8186d19d6
Support annotations on class type parameters
...
#KT-43714
2021-06-01 06:33:50 +02:00
Dmitry Petrov
9091ca7b51
JVM_IR KT-46864 handle "unused" LDC instructions properly
2021-05-31 21:12:35 +03:00
Mads Ager
886ce055f5
[JVM_IR] Do not use invoke-dynamic for targeting inline-only methods.
...
Fixes https://youtrack.jetbrains.com/issue/KT-46962
2021-05-31 18:11:50 +03:00