Dmitriy Novozhilov
18bde2c542
[FIR] Reimplement when exhaustiveness checker to fir it's logic with FE 1.0
2021-02-09 16:04:41 +03:00
Dmitriy Novozhilov
8dd9d98129
[FIR] Implement checker for exhaustive when's in expression position
2021-02-09 16:04:40 +03:00
Dmitriy Novozhilov
11ab37160e
[FIR] Save info that when was used as expression
2021-02-09 16:04:39 +03:00
Dmitriy Novozhilov
490ef210ac
[FIR] Support sealed class inheritors in multiple files
2021-02-09 16:04:39 +03:00
Dmitriy Novozhilov
38437fb036
[FIR] Rename session.firSymbolProvider to session.symbolProvider
...
to avoid visual conflicts with `session.firProvider`
2021-02-09 16:04:39 +03:00
Dmitriy Novozhilov
9724d81a49
[FIR] Support boolean elvis bound smartcasts
...
#KT-44511 Fixed
2021-02-09 15:20:36 +03:00
Dmitriy Novozhilov
2b088f1147
[FIR] Fix generating data class if there is non-property in primary constructor
...
#KT-44554 Fixed
2021-02-09 15:20:34 +03:00
Mikhail Glukhikh
d4b0688690
FIR: introduce delegate field initializers
...
Before this commit we initialized delegate fields in primary constructor,
that could provoke NPE in case delegate is used in initializer of
some property backing field.
Now we initialize delegate fields directly instead.
2021-02-08 14:28:27 +03:00
Jinseong Jeon
37a702b962
FIR: coerce to Unit when a lambda has early returns
...
^KT-39075 Fixed
2021-02-08 13:01:12 +03:00
Jinseong Jeon
83e3201677
FIR DFA: correct exit node retrieval when a safe call is the last expression
...
^KT-44699 Fixed
2021-02-08 13:01:11 +03:00
Jinseong Jeon
266432a482
FIR checker: fix condition for property type mismatch on override
2021-02-08 13:01:11 +03:00
Jinseong Jeon
065d0c66ab
FIR checker: reproduce a false alarm on type mismatch of overridden property
2021-02-08 13:01:11 +03:00
Victor Petukhov
f9e5584a3e
Report error about uninferred type parameter for all CallForImplicitInvoke psi calls
...
^KT-44368 Fixed
2021-02-08 10:40:18 +03:00
eugenpolytechnic
a564f92eef
FIR: introduce ThrowableSubclassChecker
2021-02-05 09:22:12 +03:00
Dmitriy Novozhilov
29b96aa15d
[Test] Properly merge box against java testdata into codegen/box
...
Previous commit about it was 3199ce03 and it was completely wrong
2021-02-04 10:53:50 +03:00
Dmitriy Novozhilov
ebced14db2
[FIR] Implement suppressing diagnostics with @Suppress
2021-02-03 18:10:48 +03:00
Denis.Zharkov
7942bd0b3b
Minor. Regenerate tests
2021-02-03 16:38:13 +03:00
Denis.Zharkov
d901ceb734
FIR: Fix loading Java annotations with Class[]-typed methods
2021-02-03 15:05:22 +03:00
Denis.Zharkov
8712772a5f
FIR: Add test for type resolution when referenced nested class from supertypes
2021-02-03 15:05:22 +03:00
Denis.Zharkov
e7669ef9d6
FIR: Fix builder inference case with independent calls inside lambda
2021-02-03 15:05:21 +03:00
Denis.Zharkov
173a852273
FIR: Fix uninitialized lateinit FirSymbol::symbol for supertype of Java class
...
Earlier, isForSupertypes has been mapped to different boolean parameter
2021-02-03 15:05:21 +03:00
Jinseong Jeon
4ef1e1119f
FIR LT: introduce positioning strategies for specific modifiers
2021-02-03 12:07:35 +03:00
Dmitriy Novozhilov
c432efc364
[Build] Extract configuration of JUnit5 dependencies to common helper in buildSrc
2021-02-02 17:54:59 +03:00
Dmitriy Novozhilov
2ae35b0b08
[Test] Move fir backend tests back to :compiler:fir2ir module
2021-02-02 17:54:58 +03:00
Dmitriy Novozhilov
e79d02f482
[Test] Don't generate extends clause for nested classes in generated tests for JUnit5
...
This is fine since all nested classes in tests are inners by JUnit5
specification, so they will see `runTest` method from outer root class
2021-02-02 17:54:58 +03:00
Dmitriy Novozhilov
b351ca6bd4
[Test] Regenerate spec tests
2021-02-02 17:54:50 +03:00
Dmitriy Novozhilov
3199ce03a6
[Test] Merge box against java testdata into codegen black box testsdata
2021-02-02 17:54:49 +03:00
Dmitriy Novozhilov
99cb85ab00
[Test] Merge box against java tests into codegen black box tests
2021-02-02 17:54:47 +03:00
Dmitriy Novozhilov
3a0eee64b8
[Test] Migrate all jvm tests runners for boxInline tests
2021-02-02 17:53:50 +03:00
Dmitriy Novozhilov
5c8d555808
[Test] Move KotlinAgainstKotlin tests under BlackBoxCodegen tests
2021-02-02 17:50:05 +03:00
Mikhael Bogdanov
1ea4fa4464
Fix android test with type annotations. Remove obsolete JVM 8 flavors
...
Remove some new test cause their originals would be executed on JvmTarget6OnJvm8
2021-02-02 14:32:50 +01:00
Mikhail Glukhikh
21000f4174
[FIR] Support TypeVariableMarker.isReified
2021-02-02 16:25:08 +03:00
Nicola Corti
e2b7aba086
Do not report UNNECESSARY_SAFE_CALL on ErrorType
2021-02-02 12:10:56 +03:00
Alexander Udalov
5480faf5c5
Add tests for issues fixed in JVM IR and other obsolete issues
...
#KT-6007
#KT-16445
#KT-17753
#KT-22488
#KT-23881
#KT-24135
#KT-26360
#KT-27427
#KT-27449
#KT-27830
#KT-28042
#KT-29595
#KT-30708
#KT-32793
2021-02-01 18:29:59 +01:00
Mads Ager
593fb8770b
[FIR] Fix lookup order for statics in super chains
...
The order was reversed and the static in the top-most class
in the inheritance hierarchy would be found instead of the
lowest one.
2021-02-01 18:32:55 +03:00
Dmitry Petrov
4ec369ac5b
JVM_IR fix special bridge generation for inline classes
2021-02-01 17:57:58 +03:00
pyos
ad53fc931e
JVM: optimize temporary kotlin.jvm.internal.Refs as well
...
i.e. remove the condition that there must be an LVT entry. Such
temporary `Ref`s can be created, for example, by the JVM_IR backend
if a lambda inlined at an IR level (e.g. argument to `assert`/`Array`)
is the target of a non-local return from a function inlined at bytecode
level (e.g. `run`):
IntArray(n) { i ->
intOrNull?.let { return@IntArray it }
someInt
}
->
val `tmp$0` = IntArray(n)
for (i in 0 until `tmp$0`.size) {
var `tmp$1`: Int
do {
intOrNull?.let {
`tmp$1` = it // causes `tmp$1` to become an IntRef
break
}
`tmp$1` = someInt
} while (false)
`tmp$0`[i] = `tmp$1`
}
2021-02-01 15:51:31 +01:00
eugenpolytechnic
9ad88a5a0d
FIR: introduce parameter type is Throwable check
2021-02-01 15:07:21 +03:00
eugenpolytechnic
5c0231b727
FIR: introduce CatchParameterChecker
2021-02-01 15:07:13 +03:00
Alexander Udalov
d022bb0248
Switch default JVM target to 1.8
...
#KT-29405 Fixed
2021-02-01 11:54:04 +01:00
Mikhael Bogdanov
6a29097a8c
Remove obsolete dependency for dx
2021-01-29 17:47:37 +01:00
Mikhail Glukhikh
338aad98eb
FIR: run diagnostic "with stdlib" tests also in light tree mode
2021-01-29 16:55:34 +03:00
Mikhail Glukhikh
7d4eaefd36
FIR: report UNSAFE_CALL on dot when possible
2021-01-29 16:55:26 +03:00
Jinseong Jeon
e72ddbcbfe
FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE
...
To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
2021-01-29 16:54:23 +03:00
Victor Petukhov
9efac8f68b
Propagate all annotations during creating simple functional types
...
^KT-44563 Fixed
2021-01-29 13:50:46 +03:00
Dmitry Petrov
5d7dc5fa39
JVM_IR indy-SAM conversions: minor updates
...
See: KT-44575 KT-44577
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:48 +03:00
Dmitry Petrov
f34224ecee
JVM_IR indy-SAM conversions: tests for function references equality
...
(SAM conversion using LambdaMetafactory is not used for function refs).
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:48 +03:00
Dmitry Petrov
f0abd8bc68
JVM_IR indy-SAM conversions: prohibit in crossinline lambdas
...
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00
Dmitry Petrov
ad1d80d700
JVM_IR indy-SAM conversions: add more tests
...
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00
Dmitry Petrov
98b0c07b18
JVM_IR indy-SAM conversions: inline funs and lambdas
...
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00