Dmitriy Novozhilov
c304363aea
[FE 1.0] Report WRONG_ANNOTATION_TARGET on annotations on type arguments
...
^KT-47772 Fixed
2021-07-19 14:00:24 +03:00
Andrey Zinovyev
7e9f27436a
[FIR] Fix cfg for safe call inside elvis
2021-07-19 13:40:31 +03:00
Andrey Zinovyev
a6984c5198
[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic
2021-07-19 13:40:28 +03:00
Dmitry Petrov
d41fc0b599
PSI2IR fix suspend conversion tests
...
- support chained suspend conversion + SAM conversion
- support suspend conversion in vararg elements
2021-07-17 09:10:19 +03:00
Victor Petukhov
0cc6fbbc6e
Add tests for converting expressions of function types to suspending functional types
2021-07-17 09:10:17 +03:00
Mads Ager
b51ff799cb
Fix IteratorNext intrinsic to cast its dispatch receiver to
...
the expected type.
^KT-47741 Fixed.
2021-07-16 21:07:11 +02:00
Victor Petukhov
6a1ec92d39
Introduce specific error for calls which could be resolved only with unrestricted builder inference
...
^KT-47747 Fixed
2021-07-16 19:32:36 +03:00
Victor Petukhov
357fda2efa
Initialize builder inference lambda anyway, even a call is inapplicable
...
^KT-47744 Fixed
2021-07-16 19:32:35 +03:00
Mikhael Bogdanov
5f53a2071d
Update test affected by ProperTypeInferenceConstraintsProcessing feature
2021-07-16 13:26:37 +00:00
Mikhael Bogdanov
392dce9a40
Update test affected by PrivateInFileEffectiveVisibility feature
2021-07-16 13:26:36 +00:00
Mikhael Bogdanov
c519003e13
Update test affected by ProhibitSimplificationOfNonTrivialConstBooleanExpressions feature
2021-07-16 13:26:36 +00:00
Mikhael Bogdanov
a657e63dbb
Update test affected by ForbidUsingExtensionPropertyTypeParameterInDelegate feature
2021-07-16 13:26:35 +00:00
Mikhael Bogdanov
70df4f10c5
Update test affected by AbstractClassMemberNotImplementedWithIntermediateAbstractClass feature
2021-07-16 13:26:34 +00:00
Mikhael Bogdanov
f05d470f6a
Update test affected by 'ProhibitJvmFieldOnOverrideFromInterfaceInPrimaryConstructor' feature
2021-07-16 13:26:33 +00:00
pyos
f5dd5ead1f
JVM: produce a better error on @JvmStatic external in interface
...
Java does not permit `static native` methods in interfaces, so this
never worked on any existing JRE.
#KT-43696 Fixed
2021-07-16 15:24:09 +02:00
pyos
ad7ed483f3
JVM_IR: copy correspondingProperty of static external functions
...
Required for correctly mapping their names.
#KT-47715 Fixed
2021-07-16 15:24:05 +02:00
Dmitriy Novozhilov
22f57220c1
[FE 1.0] Report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE on rhs of assign
...
^KT-47729 Fixed
2021-07-16 15:18:46 +03:00
Dmitriy Novozhilov
afb7625d0c
[FE 1.0] Fix false positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
...
^KT-47729 In progress
2021-07-16 15:18:44 +03:00
Dmitriy Novozhilov
2fb5f776d8
[FE 1.0] Report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE on calls in parenthesis
...
^KT-47729 In progress
2021-07-16 15:18:38 +03:00
Victor Petukhov
ea4ab46765
Report implicit inferred Nothing only for own type parameters and in delegation resolve
...
^KT-47724 Fixed
2021-07-16 11:21:51 +03:00
Ilya Chernikov
c83614386e
[minor] FIR: (temporarily) fix testdata due to different builtins behavior
2021-07-16 02:24:45 +03:00
Ilya Chernikov
c9b6847d83
FIR: Add test on delegated member with default param in overridden...
...
sensitive to the file processing order, therefore failing on the
current fir2ir at least with the new irBuiltIns
2021-07-16 02:24:36 +03:00
Ilya Chernikov
5b2acea98f
FIR: Add analysis flag for loading IR builtins from sources
2021-07-16 02:24:32 +03:00
Ilya Chernikov
8f5d5c3ace
FIR: Fixes in testdata after implementing FIR-specific IrBuiltIns
2021-07-16 02:24:29 +03:00
Mikhael Bogdanov
f080dbb78c
Update resolveAnnotations tests in new infrastructure
2021-07-15 17:08:17 +00:00
Mikhael Bogdanov
3aeb9291fe
Move resolveAnnotations tests into diagnostics tests
2021-07-15 17:08:16 +00:00
Dmitry Petrov
8ea4916d64
JVM_IR KT-47739 recognize fake override external stubs
2021-07-15 19:20:39 +03:00
Ivan Kochurkin
dd54338ec0
[FIR] Fix positioning and detecting of WRONG_NUMBER_OF_TYPE_ARGUMENTS
...
Refactor code and fix compilation errors caused by changes to symbol.fir
2021-07-15 19:02:58 +03:00
Ivan Kochurkin
0c25d280ee
[FIR] Fix calculating of source of TypeArgumentList, add source to FirQualifierPart
...
Fix positioning for TYPE_ARGUMENTS_NOT_ALLOWED
2021-07-15 19:02:54 +03:00
Ivan Kochurkin
28a6928873
[FIR] Check rest OUTER_CLASS_ARGUMENTS_REQUIRED diagnostics on checkers stage
...
Add FirOuterClassArgumentsRequiredChecker
2021-07-15 19:02:45 +03:00
Ivan Kochurkin
0fc8be4d60
[FIR] Implement OUTER_CLASS_ARGUMENTS_REQUIRED diagnostics
2021-07-15 19:02:40 +03:00
Georgy Bronnikov
28bff2ba4f
JVM_IR: add test for calling monitorEnter/Exit from serialized code.
2021-07-14 21:20:38 +03:00
Georgy Bronnikov
fa4efd3303
JVM_IR: fix deserialization of Java static field symbols
2021-07-14 21:20:35 +03:00
Georgy Bronnikov
7bbc04b6a2
JVM_IR: reconstruct fake overrides after IR deserialization.
...
We need to keep track of local signatures for deserialized symbols.
2021-07-14 21:20:29 +03:00
Georgy Bronnikov
96ce124268
JVM_IR: serialize fake overrides in IR
2021-07-14 21:20:21 +03:00
Georgy Bronnikov
b2617199bc
JVM_IR: call serialization for IR.
...
Serializer for IR is called when -Xserialize-ir flag is set.
2021-07-14 21:20:04 +03:00
Mikhail Glukhikh
113d2653aa
Drop deprecated -Xexperimental flag from compiler and tests
2021-07-14 21:18:23 +03:00
pyos
07cb3a5ff8
JVM: do not reify methods of objects in lambdas
...
All type parameters used in them are not from the inline function
anyway.
2021-07-14 10:11:05 +02:00
pyos
100d2d629c
JVM: inline default lambda coercions from bridge invoke
...
The type of the default lambda may be a subtype of the parameter type,
so we can't really generate our own coercions at all as we don't know
the precise Kotlin type of the `invoke` method.
2021-07-14 10:11:05 +02:00
Dmitry Petrov
dc16d66fb1
Minor: regenerate tests
2021-07-13 21:23:17 +03:00
pyos
3dc7b6c3ee
IR: preserve argument evaluation order more carefully
...
1. receivers should be evaluated before named arguments;
2. just because an argument has no side effects doesn't mean it is not
affected by the other arguments' side effects - in that case it
should still be evaluated in source order.
#KT-47660 Fixed
2021-07-13 21:23:15 +03:00
Dmitriy Novozhilov
47b0071560
[FE 1.0] Properly handle intersection types in check if cast possible or not
...
^KT-47685 Fixed
2021-07-13 10:35:03 +03:00
Dmitriy Novozhilov
7b5a5f5682
[FE 1.0] Report USELESS_IS_CHECK if is expression is always false
...
^KT-47684 Fixed
2021-07-13 10:35:01 +03:00
Dmitriy Novozhilov
4deb935f76
[FIR] Mark value classes as inline in raw fir building
2021-07-13 10:31:23 +03:00
pyos
d988853c11
JVM_IR: optimize out redundant delegated property receiver fields
...
Now this:
class C {
val x = something
val y by x::property
}
is *exactly* the same as this:
class C {
val x = something
val y get() = x.property
}
(plus a `getY$delegate` method)
2021-07-12 22:38:45 +02:00
pyos
6897e89bbc
JVM: add tests for optimized getDelegate
2021-07-12 22:38:45 +02:00
pyos
5d0102a966
JVM_IR: generate $delegate methods for val x by ::y
2021-07-12 22:38:44 +02:00
pyos
7ae4303e1b
JVM_IR: slightly refactor JvmPropertiesLowering
...
to make it easier to generate different kinds of synthetic methods.
#KT-47609 Fixed
2021-07-12 22:38:44 +02:00
pyos
e49410e07b
JVM_IR: optimize delegation by property references
...
E.g. a statement like
var x by ::y
is semantically equivalent to
var x
get() = y
set(value) { y = value }
and thus does not need a full property reference object, or even a field
if the receiver is not bound.
#KT-39054 Fixed
#KT-47102 Fixed
2021-07-12 22:38:43 +02:00
Ivan Kochurkin
66e052b9b3
[FIR] Implement SPREAD_OF_NULLABLE
2021-07-12 23:16:47 +03:00