Jinseong Jeon
a841a0bbca
FIR: transform other parts of function call even though callee is an error
2021-02-19 10:17:16 +03:00
Hyojae Kim
82ac482143
Fix typo ( #4051 )
...
Fix typo
2021-02-18 12:28:19 +03:00
Dmitriy Novozhilov
9b4949a3c5
[FIR] Fix taking symbol of expression with smartcast inside DFA
2021-02-18 10:10:38 +03:00
Dmitriy Novozhilov
5ce36a528e
[FE] Prohibit sealed fun interfaces
...
#KT-44947 Fixed
2021-02-17 13:54:10 +03:00
Mark Punzalan
2f450549ab
FIR IDE: Update FIR diagnostic test data for
...
INAPPLICABLE_LATEINIT_MODIFIER.
2021-02-15 19:37:14 +01:00
Alexander Udalov
899f75466d
Remove tests on kotlin-annotations-android
...
#KT-44815
2021-02-15 17:23:44 +01:00
Victor Petukhov
edb8007d52
Add test for errors reporting of UPPER_BOUND_VIOLATED
2021-02-15 12:13:52 +03:00
Victor Petukhov
befe8599c4
Report warnings or errors for violated type parameter's upper bounds from Java annotated with nullability annotations
...
^KT-43262 Fixed
2021-02-15 12:13:50 +03:00
Dmitriy Novozhilov
2d5b685535
[FIR] Fix processing constructors of sealed classes
...
- Allow declaring protected constructors in sealed classes
- Make default visibility of sealed class constructor `protected`
KT-44861
KT-44865
2021-02-12 13:36:41 +03:00
Dmitriy Novozhilov
7c61ddc72b
[FE] Allow declaring protected constructors in sealed classes
...
#KT-44865 Fixed
2021-02-12 13:36:39 +03:00
Dmitriy Novozhilov
f3a8fcaea6
[FE] Make constructors of sealed classes protected instead of internal
2021-02-12 13:36:38 +03:00
Jinseong Jeon
3d635b6a94
FIR: unwrap smartcast expression when extracting effects of contract
2021-02-11 17:02:16 +03:00
Dmitriy Novozhilov
0c0c53cc2e
[FE] Don't analyze members with CLASSIFIERS kind filter in AbstractLazyMemberScope
...
This commit introduces partial support of descriptorKindFilter in
`AbstractPsiBasedDeclarationProvider`. Without it there may be an error
in following case:
```
sealed class Base
class Derived : Base()
class Test<out V>(val x: Base) {
private val y = when (x) {
is Derived -> null
}
}
```
Here we start to resolve type of `y`, then go to computation of inheritors
of sealed class Base, which also may be inside Test, so we need get all
nested classifiers in Test. But without this filtration we will start
computing descriptor for `y` again, which leads to ReenteringLazyComputationException
#KT-44316 Fixed
2021-02-10 16:56:49 +03:00
Dmitriy Novozhilov
671ebc6819
[FIR] Fix detecting that if in then branch of outer if used as expression
2021-02-10 14:17:38 +03:00
Jinseong Jeon
bd37badf29
FIR checker: add diagnostics for backing fields
2021-02-10 12:29:34 +03:00
Dmitriy Novozhilov
6dd331d7e8
[FIR] Add tests for non exhaustive when as last expression of lambda
...
KT-44810
2021-02-09 16:04:42 +03:00
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