Ilya Kirillov
4530041cbb
Analysis API: move reference resolve testsdata with errors to dedicated folders
2022-01-31 21:12:30 +01:00
Ilya Kirillov
caddbda01b
Analysis API FIR: introduce library resolve tests
2022-01-31 21:11:56 +01:00
Ilya Kirillov
96e1f1e7d4
Analysis API: fix some compilation errors in reference resolve testdata
2022-01-31 21:11:54 +01:00
Ilya Kirillov
d926dda27f
Analysis API FIR: introduce declarations from library resolve
...
^KT-50252 fixed
2022-01-31 21:11:52 +01:00
Ilya Kirillov
d9200affe4
LL API: simplify FirModuleResolveState interface
2022-01-31 21:11:51 +01:00
Mikhail Glukhikh
1137e61fc8
FIR: add test for KT-50969
2022-01-31 21:59:15 +03:00
Roman Golyshev
bc3142f4da
Remove accidentally copied testData file
2022-01-29 07:42:18 +00:00
Roman Golyshev
f0f2f67024
KT-50862 Unwrap use-site substitution overrides
...
Use-site substitution override happens in situations like this:
```
interface List<A> { fun get(i: Int): A }
fun take(list: List<String>) {
list.get(10) // this call
}
```
We want to have those overrides unwrapped, because we don't want
to deal with a different KtSymbol for each possible use-site
^KT-50862 Fixed
2022-01-29 07:42:18 +00:00
Roman Golyshev
564e408434
KT-50862 Add name property to KtSignature
...
See the KDoc of the property for the reasons why
it was created
2022-01-29 07:42:17 +00:00
Mikhail Glukhikh
c2f43dd98e
Revert OPT_IN_MARKER_ON_OVERRIDE limitation #KT-48890 Fixed
2022-01-28 13:40:35 +00:00
Mikhail Glukhikh
c2ab09fa84
Add test for KT-49653
2022-01-27 17:27:38 +03:00
Roman Golyshev
9ff46004e4
FIR IDE: Remove typesCache from KtSymbolByFirBuilder
...
This cache wasn't working too well, because ConeTypes have
equals/hashCode implementations which do not account for types'
attributes (like annotations, for example).
Because of that, `String` and `@Annotated String` were considered the
same type, and the cache was remembering whichever came first.
2022-01-27 16:23:44 +03:00
Victor Petukhov
1a23cd8c45
[FE 1.0] Don't try to report specialized resolution ambiguity error for builder inference if the corresponding substitutor is empty
...
^KT-50989 Fixed
2022-01-27 15:30:16 +03:00
Ilya Muradyan
9637b6b848
REPL: Fix REPL scripts metadata to be correctly recognized by class file decompiler
2022-01-27 02:23:27 +03:00
Mikhail Glukhikh
ad0d0ca47f
Drop redundant Suppress("RemoveExplicitTypeArguments")
2022-01-26 12:19:55 +00:00
Roman Golyshev
8befbc6375
KTIJ-20826 Approximate builder inference stub types as type parameters
...
This is a temporary fix to avoid crashes in FIR IDE
Of all stub types, only `ConeStubTypeForChainInference` is handled now,
so we can catch the other possible errors with stub types (in the
delegates' inference, for example)
The fix introduced in this commit should be reworked when KT-50916 is
fixed
^KTIJ-20826 Fixed
2022-01-25 17:09:03 +03:00
Dmitriy Novozhilov
d1fb8338ef
[FIR] Infer type of elvis from lhs if rhs is Nothing
...
^KT-50875 Fixed
2022-01-23 08:22:07 +03:00
Ivan Kochurkin
defb0cf611
[FIR] Fix ambiguity between Sequence.forEach and Iterable.forEach (with @HidesMembers) ^KT-50776 Fixed
2022-01-21 19:34:10 +03:00
Ilya Kirillov
d74418f575
LL API: remove old resolve api
2022-01-21 16:46:40 +01:00
Ilya Kirillov
6dd01a2ff5
LL API: do not lazy resolve local declarations
2022-01-21 16:46:39 +01:00
Ilya Kirillov
c7729689c4
LL API: always create FirFile with lazy bodies
2022-01-21 16:46:38 +01:00
Ilya Kirillov
75ae37fcbf
LL API: remove unused resolve api
2022-01-21 16:46:36 +01:00
Ilya Kirillov
7a0d1ce0d1
LL API: consider enum entries as structure elements
2022-01-21 16:46:30 +01:00
Ilya Kirillov
e1fece6402
Analysis API: fix testdata of reference resolve tests which started to pass
2022-01-21 16:46:28 +01:00
Ilya Kirillov
16fbc09997
Analysis API: use FirSymbol in KtFirSymbol's instead of FirDeclaration
...
^KT-50271 fixed
2022-01-21 16:46:27 +01:00
Mikhail Glukhikh
98cdc95cd0
FIR DFA: exit delegate expression only after accessor completion
...
This commit fixes DFA problem (see test) when we accidentally try
to merge incoming flows from member property (val ... by cached ...) and
the following function. While completing lambda of buildList { ... }
inside by cached we accidentally assume that delegate is already left
and add the lambda into exitsFromCompletedPostponedAnonymousFunction.
This commit fixes the problem by exiting delegate later, after completion.
2022-01-20 23:46:39 +03:00
Mikhail Glukhikh
d2bfb7153e
Add test from KT-49925 (example 3, fails yet)
2022-01-20 23:46:35 +03:00
Ilya Kirillov
3b943706d8
Analysis API: fix call resolve inside plusAssign target
...
^KT-50864 fixed
2022-01-20 23:26:28 +03:00
Ilya Kirillov
db1dedc9fe
LL API: add source element kind rendering to the GetOrBuildFirTest
2022-01-20 23:26:28 +03:00
Dmitriy Novozhilov
def799cc4e
[FIR] Fix inference of postponed lambdas if containg call has explicit type arguments
2022-01-20 11:25:46 +03:00
Dmitriy Novozhilov
7d8a8d543f
[FIR] Fix processing calls on unstable smartcasts with check not null call
2022-01-20 11:25:45 +03:00
Dmitriy Novozhilov
1a3841d66d
[FIR] Properly enhance raw Class type in java annotations
2022-01-20 11:25:44 +03:00
Dmitriy Novozhilov
239a330ddd
[FE 1.0] Add test for KT-50850
2022-01-20 11:25:41 +03:00
Dmitriy Novozhilov
e5275992d2
[FIR] Return scope session from LowLevelFirAnalyzerFacade instead of failing
...
This is needed for proper work of FirScopeDumpHandler for
low level fir tests
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
c80cfb0fdb
[FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
...
This big refactoring is needed to cleanup building of overrides
mappings and prevent creating redundant intersection overrides in
cases when there is no need in them:
```kotlin
interface A {
fun foo()
}
interface B {
fun foo()
}
interface C : A, B {
override fun foo()
}
```
Before this refactoring there was next override tree:
C.foo
intersection override (A.foo, B.foo)
A.foo
B.foo
Also this commit fixes special mapping of overrides in jvm scopes
for declarations which have kotlin builtins in supertypes with
special java mapping rules (collections, for example)
2022-01-19 15:24:43 +03:00
Denis.Zharkov
b2543b7a26
Fix false negative UPPER_BOUND_VIOLATED with typealiases in supertypes
...
^KT-50797 Fixed
^KT-50798 Open
2022-01-19 09:52:16 +03:00
Dmitriy Novozhilov
5fc1e2e0cb
[FIR] Don't create DNN types for flexible simple types
...
^KT-50788
2022-01-18 13:41:31 +03:00
Victor Petukhov
72a78eb423
Replace errors with warnings for type checker recursion on delegates
...
^KT-49477 Fixed
2022-01-17 21:27:14 +03:00
Victor Petukhov
a4a2f71fca
Introduce deprecation cycle for reporting errors on some illegal equality calls inside a builder inference call
...
^KT-43493 Fixed
2022-01-17 19:44:16 +03:00
Dmitriy Novozhilov
8daf7774ba
[FIR] Properly handle when subject expression in DFA of equality calls
...
^KT-50785 Fixed
2022-01-17 17:59:23 +03:00
Dmitriy Novozhilov
57346bac54
[FIR] Properly handle flexible types during creation of DNNT
...
^KT-50788 Fixed
2022-01-17 17:59:22 +03:00
Mikhail Glukhikh
1274e2b90a
Deprecate ExtensionFunctionType on a non-function types
...
Related to KT-43527
2022-01-14 22:20:44 +03:00
Mikhail Glukhikh
d0fa3eb1d3
Forbid ExtensionFunctionType on functional types without parameters
...
#KT-43527 Fixed
2022-01-14 22:20:24 +03:00
Mikhail Glukhikh
beb2957726
FIR: render <T> name for DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER
...
Related to KT-50183
2022-01-14 22:20:23 +03:00
Mikhail Glukhikh
b689bbf5c7
Forbid usages of super if in fact it accesses an abstract member
...
#KT-49017 Fixed
2022-01-14 22:20:21 +03:00
Evgeniy.Zhelenskiy
e97ca2ada4
[Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC
2022-01-14 13:51:57 +00:00
Evgeniy.Zhelenskiy
df1de3a7d3
[JVM] Forbid non-JvmInline value classes again
2022-01-14 13:51:56 +00:00
Dmitriy Novozhilov
bb6c6dc45d
[FE 1.0] Fix reporting of UNINITIALIZED_ENUM_ENTRY on qualified enums
...
^KT-41124
^KT-50758 Fixed
2022-01-14 14:26:54 +03:00
Dmitriy Novozhilov
9f870b0549
[FIR] Report errors on cycles in annotation parameter types
...
^KT-47932
2022-01-14 14:26:53 +03:00
Dmitriy Novozhilov
e9ac24dc33
[FE 1.0] Report errors on cycles in annotation parameter types
...
^KT-47932
^KT-50753 Fixed
2022-01-14 14:26:52 +03:00