Dmitriy Novozhilov
83ed67546b
[Test] Support WITH_STDLIB directive in js box tests
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
dfcff132fd
[FIR] Fix false-positive smartcast on receiver in rhs of elvis
...
#KT-44942 Fixed
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
2b39282682
[FIR] Render original type before smartcasted type in DEBUG_INFO_EXPRESSION_TYPE
...
This is made for keep consistency with same renderer in FE 1.0
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
d4c26cca52
[FIR] Use type without smartcast for local variable with smartcasted initializer
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
40e286b354
[FIR] Increase level of sequential when branches
...
Level of CFGNode is used to determine which call is a common one for
creating node with union of arguments (to merge flow from multiple
in-place lambdas). Before this change calls in different when branches
may have same node level, which entail passing smartcasts from moddle of
one branch to another
```
val x: Any = ...
when {
... -> run { x as String } // (1)
... -> {
run {
x.foo()
} // (2)
"hello"
}
}
```
Call `(1)` was assumed as argument of call `(2)` which is incorrect
#KT-44814 Fixed
2021-02-16 17:51:31 +03:00
Dmitriy Novozhilov
92271527cb
[Test] Add CFG and IR dump handlers to FirBlackBoxTests
2021-02-16 17:51:31 +03:00
Dmitriy Novozhilov
b5619dbf37
[FIR] Add ability to render node levels in CFG graph dumper
2021-02-16 17:51:31 +03:00
Ilya Kirillov
3e22011626
Fix compilation of HLRedundantVisibilityModifierInspection
2021-02-16 15:47:08 +01:00
Ilya Kirillov
e8f3ebdd19
FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker
2021-02-16 15:23:18 +01:00
Ilya Kirillov
6d97841f38
FIR IDE: introduce HLLocalInspectionTest
2021-02-16 15:23:18 +01:00
Ilya Kirillov
7fb6c22889
FIR IDE: allow creating inspections by extended checkers
2021-02-16 15:23:17 +01:00
Ilya Kirillov
b9a4613e44
FIR IDE: remove getMessage from HLPresentation as it duplicates HLApplicator.getActionName
2021-02-16 15:23:17 +01:00
Ilya Kirillov
c13889c2ea
FIR: add ability to specify checkers list for checker components
2021-02-16 15:23:17 +01:00
Ilya Kirillov
ca4a07f73f
Unify message bundles used in IDEA FIR into KotlinBundle
2021-02-16 15:23:17 +01:00
Vladimir Dolzhenko
6352814d45
Fix NPE
...
#KTIJ-898 Fixed
Original commit: 12d8e88b846f29598ca3904b49996bd6a9891ccd
2021-02-16 14:21:40 +00:00
Vladimir Dolzhenko
98ba379e07
Fixed NPE on StandaloneScriptRootsCache instantiation
...
Relates to ^EA-218043
#KTIJ-1137 Fixed
Original commit: 1d63a1b48d480b958ff44676c42b698a8ca5f64a
2021-02-16 14:21:39 +00:00
Dmitriy Dolovov
45b17120ad
[Commonizer] Minor. Rename: 'dependee' -> 'dependency'
2021-02-16 17:19:49 +03:00
Dmitriy Dolovov
ec7e411d80
[Commonizer] Remove classifierId from CIR class/TA nodes
2021-02-16 17:19:43 +03:00
Dmitriy Dolovov
ef931d5561
[Commonizer] Don't keep kotlin/Any as the single supertype in CirClass
2021-02-16 17:19:38 +03:00
Victor Petukhov
baeee8988e
[all-open] Don't affect private declarations to change their modality to open
2021-02-16 17:18:08 +03:00
Victor Petukhov
ec41775d7e
[all-open] Fix formatting
2021-02-16 17:18:07 +03:00
Mads Ager
05ff2b1292
[JVM_IR] Extend when to switch translation to deal with nested ors.
...
FIR translates:
```
when (x) {
1, 2, 3 -> action
else -> other_action
}
```
to an IR structure with nested ors:
```
if ((x == 1 || x == 2) || (x == 3)) action
else other_action
```
This change allows that to turn into switch instructions in the
JVM backend.
2021-02-16 03:20:07 -08:00
Ilya Kirillov
91581d6c1a
Move KotlinBundle to frontend-independent module
...
to use from IDEA FIR
2021-02-16 12:16:17 +01:00
Mikhail Glukhikh
a8c23e1c3a
FirDefaultStarImportingScope: filter INVISIBLE_CLASSES properly
2021-02-16 12:38:46 +03:00
Mikhail Glukhikh
940588a9bb
FE: commonize throw-related annotation FQ names
2021-02-16 12:38:46 +03:00
pyos
2dc0404751
FIR: prioritize visible imported classes during type resolution
...
and produce an error on ambiguity.
2021-02-16 12:38:45 +03:00
pyos
291ed4a38a
FIR: handle typealiases during conflict resolution
2021-02-16 12:38:45 +03:00
Hung Nguyen
592c285198
Kapt: Don't create KDocCommentKeeper when not needed
...
Previously, even if `keepKdocComments=false`, we would still create the
KDocCommentKeeper object unnecessarily.
This commit makes sure we create the object only if
`keepKdocComments=true`.
Bug: Clean-up after commit e252171 for KT-43593
Test: Existing tests
2021-02-16 11:53:49 +03:00
Ilya Kirillov
0a72e16451
FIR: transform DiagnosticBuilder DSL to an object
...
To make diagnostics visible in symbol search in IJ
2021-02-15 22:28:13 +01:00
SokolovaMaria
15aaf3a078
Copy typeParameters from original declaration to the exportedDefaultStubFun before substitution of type parameters
2021-02-15 23:17:11 +03:00
Mark Punzalan
706d3e5aa8
FIR IDE: Add quickfix for VAR_ANNOTATION_PARAMETER.
2021-02-15 21:07:32 +01:00
Mark Punzalan
2f450549ab
FIR IDE: Update FIR diagnostic test data for
...
INAPPLICABLE_LATEINIT_MODIFIER.
2021-02-15 19:37:14 +01:00
Mark Punzalan
4e44804c77
FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER.
...
Also changed FE1.0 checker and all related fix factories to report error
on the declaration instead of the lateinit modifier. This is consistent
with the direction of all checkers in FIR (no reporting on modifiers).
2021-02-15 19:37:14 +01:00
Dmitry Petrov
b1ab64e854
JVM_IR KT-44483 argument adaptation is already done in PSI2IR
2021-02-15 19:41:39 +03:00
Alexander Udalov
f1b0e893ae
Remove kotlin-annotations-android
...
#KT-44815 Fixed
2021-02-15 17:23:44 +01:00
Alexander Udalov
899f75466d
Remove tests on kotlin-annotations-android
...
#KT-44815
2021-02-15 17:23:44 +01:00
Alexander Udalov
3432f581cb
Remove compiler support for kotlin-annotations-android
...
#KT-44815
2021-02-15 17:23:44 +01:00
Jinseong Jeon
a884555171
FIR: bail out early for override check if base candidate is private
2021-02-15 19:16:36 +03:00
Jinseong Jeon
09640d9d63
FIR checker: apply override checker to anonymous objects
...
^KT-44695 Fixed
2021-02-15 19:16:35 +03:00
Jinseong Jeon
9370f918e9
FIR: use override checker when populating directOverriddenProperties
2021-02-15 19:16:35 +03:00
Victor Petukhov
fa1507fb91
Fix FIR test lambdaParameterTypeInElvis
2021-02-15 18:51:51 +03:00
Simon Ogorodnik
83836037f8
Add documentation on type checker context / type system context
2021-02-15 18:29:00 +03:00
Simon Ogorodnik
3909e3c54c
Decouple TypeCheckerContext and TypeSystemContext
2021-02-15 18:28:58 +03:00
Andrei Klunnyi
53a7dc1126
KT-44839 [Sealed interfaces]: restore move-tests for lang-version < 15
...
This commit restores tests removed in 690fb47c .
2021-02-15 15:28:00 +00:00
Andrei Klunnyi
eb0c73fd5e
KT-44839 [Sealed interfaces]: ability to specify compiler options in tests
2021-02-15 15:28:00 +00:00
Andrei Klunnyi
c63a9afa56
KT-44839 [Sealed interfaces]: move refactoring for language level < 1.5
...
This commit restores sealed-check-logic for language level < 1.5
mistakenly removed in 690fb47c .
^KT-44839 fixed
2021-02-15 15:27:59 +00:00
Yahor Berdnikau
5c7aadece9
Fix test founds more lines then expected.
...
Now Gradle additionally prints warning message regarding using debug
logs that wrapped in '####*' lines.
2021-02-15 15:35:23 +01:00
Yahor Berdnikau
224aea0953
Ignore test due to the bug in AGP on Gradle 6.8+.
...
It is not possible to make it work via reflection.
2021-02-15 15:35:23 +01:00
Yahor Berdnikau
9d9df0c4ff
Expect new attributes compatibility error.
...
Since Gradle 6.4 error message was changed, when dependency does not
provide all required attributes.
2021-02-15 15:35:22 +01:00
Yahor Berdnikau
6c0ee2f9ea
Update test to use new test xml output format.
...
This format was slightly changed starting Gradle 6.6. Adapted
tests to use new expected output when current Gradle runner is greater
then 6.5.
2021-02-15 15:35:22 +01:00