Mikhael Bogdanov
4b6202c902
JVM_IR. Support inlining of bound CR
2019-12-30 08:35:46 +01:00
Pavel Kirpichenkov
2d21b82501
[NI] Remove hack for special functions
...
Treating special functions for `if`, `when`, `try`, `?:` as not accepting `Nothing` result type is incorrect.
Making so leads to cases with uninferred `Nothing` result type for inner calls and lost data flow info.
2019-12-27 18:40:42 +03:00
Alexander Gorshenev
9a12641fde
Allow parallel access to klib zip filesystem
2019-12-27 18:19:48 +03:00
Nikolay Krasko
4c28e0dec3
Split tests to common and platform parts
2019-12-27 16:53:17 +03:00
Mikhail Glukhikh
6da3c2fa4e
FIR2IR: set parent correctly (~) for anonymous functions
2019-12-27 16:13:02 +03:00
Juan Chen
3dc58bc995
[FIR2IR] Fix translating primitive array types
...
This commit fixes two issues in the existing implementation of translating primitive array types:
* IrType.getArrayElementType throws an exception when the receiver is a primitive array type, because IR expects primitive array types use symbols defined in IrBuiltIns, but fir2ir translation doesn't;
* IteratorNext.toCallable assumes all element types are boxed.
The first issue is fixed by changing the fir2ir type translation to use symbols in IrBuiltIns for primitive array types, and the second by not unboxing primitive types.
2019-12-27 15:32:18 +03:00
Mikhail Glukhikh
1cf582e9ed
FIR2IR: set extension receiver for anonymous functions
2019-12-27 15:31:36 +03:00
Mikhail Glukhikh
aa796e962a
FIR2IR (minor): remove duplicate of generateErrorCallExpression
2019-12-27 15:10:23 +03:00
Mikhail Zarechenskiy
95dd322bf0
Update FIR diagnostics test
2019-12-27 14:11:47 +03:00
Mikhail Glukhikh
e4b2c238c7
FIR2IR: temporarily allow null receivers & use findIr*Receiver also for fields
2019-12-27 13:46:06 +03:00
Mikhail Glukhikh
338281e05f
[FIR TEST]: add test for KT-35730
2019-12-27 13:46:06 +03:00
Mikhail Glukhikh
15f373a864
FIR2IR: support object receiver case (this fixes 24 black box tests)
2019-12-27 13:46:05 +03:00
Mikhail Glukhikh
f3b5ee4cba
FIR2IR: fix assertion in getIrFunctionSymbol (anonymous function case)
2019-12-27 13:46:05 +03:00
simon.ogorodnik
5e426fdc71
[FIR] Optimization & checking fix: remove usage of dispatchReceiverValue
2019-12-27 13:45:59 +03:00
simon.ogorodnik
686965c0d3
[FIR] Code cleanup: get rid of typeProvider hack
2019-12-27 13:45:57 +03:00
Denis Zharkov
caf02806d5
NI: Fix resolution ambiguity for references returned from lambda
...
^KT-32267 Fixed
2019-12-27 11:36:19 +03:00
Denis Zharkov
534718794c
Minor. Extract PSICallResolver::createCallableReferenceKotlinCallArgument
2019-12-27 11:36:18 +03:00
Denis Zharkov
840acbac68
Minor. Make properties in KotlinResolutionCallbacksImpl private
2019-12-27 11:36:18 +03:00
Juan Chen
4c04ad2371
FIR: Add bindings for dispatch receiver parameters
...
Before this commit, such descriptors have null owners, which causes problems when the getter of the owner property is called.
2019-12-27 10:13:44 +03:00
Mikhail Glukhikh
a54ef3e427
FIR invoke resolve: remove redundant candidates
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
f47c3f0f5a
FIR: if necessary, use explicit receiver as argument in invoke collector
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
0c88ecdc56
FIR resolve: introduce builtInExtensionFunctionReceiverValue
...
This commit allows us to distinguish extension lambda receivers
from simple extension receivers thus fixing some resolve problems.
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
de50f8aef3
FIR resolve: add partial support of extension lambda calls
...
Here we introduce ONLY_IMPLICIT_RECEIVER tower level
to support extension lambda calls on local variables,
and soften extension receiver checks to make such extensions visible & applicable.
Also here we try to map arguments twice for functional types
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
49e94f1ee3
FIR invoke consumer: minor rename
2019-12-27 09:57:35 +03:00
Mikhail Glukhikh
9a514dfdd9
FIR invoke consumer: do not process last data twice
2019-12-27 09:57:35 +03:00
Mikhail Glukhikh
933bdc98e5
Minor: extract val FirTowerConsumer.resultCollection
2019-12-27 09:57:35 +03:00
Mikhail Glukhikh
20fee028f9
[FIR TEST] Add test with incorrect invoke receiver
2019-12-27 09:57:35 +03:00
Mikhail Glukhikh
a8a50fa657
Fix raw FIR building with parenthesized expression as selector
2019-12-27 09:57:34 +03:00
Dmitrii Petrov
a18fecb05f
Minor: mute test for pre-1.3 behavior in JVM_IR
2019-12-26 23:45:11 +03:00
Dmitriy Novozhilov
04e567dbf9
[NI] Don't replace context dependency for blocks with expected type
...
#KT-35702 Fixed
2019-12-26 20:31:06 +03:00
Alexander Gorshenev
39e1b24c2c
Don't search for expects when not given -Xmpp-klibs
2019-12-26 18:17:36 +03:00
Dmitriy Novozhilov
d210df9ea3
Update spec testdata according to previous commits
2019-12-26 17:43:28 +03:00
Dmitriy Novozhilov
5dfe100ae5
Allow use reference to reified type parameters in contracts since 1.4
2019-12-26 17:43:28 +03:00
Dmitriy Novozhilov
9c1b68f839
Prohibit using references to this from outer scope in contract declarations
2019-12-26 17:43:28 +03:00
Dmitriy Novozhilov
f083edfac2
Allow contracts on final non-override members since 1.4
2019-12-26 17:43:27 +03:00
Mikhail Zarechenskiy
8871c8b4fd
Migrate diagnostic tests to 1.4
2019-12-26 15:08:51 +03:00
Victor Petukhov
d3f63166f3
[JPS] Include Kotlin reflection for tests-spec though explicit specifying in gradle dependencies
2019-12-26 14:27:44 +03:00
Dmitry Petrov
babe6eb581
Fix explicit 'equals' for primitive types
2019-12-26 12:44:54 +03:00
Dmitry Petrov
1d5370a56a
Fix rationale for test muted in JVM_IR (see KT-35656)
2019-12-26 12:44:54 +03:00
Denis Zharkov
7898922066
NI: Fix type mismatch caused by smartcast
...
^KT-25434 Fixed
2019-12-26 12:35:35 +03:00
Denis Zharkov
ae4397fbfb
Fix bare typed smartcasts in NI
...
Star projections should be replaced with star projections
not for their expansions
See the test
2019-12-26 12:35:34 +03:00
Denis Zharkov
0b385cc532
NI: Approximate captured-for-star-projections to *
...
^KT-35602 Fixed
2019-12-26 12:35:32 +03:00
Dmitriy Novozhilov
7728102a77
Cleanup and reformart DelegatedPropertyResolver.kt
2019-12-26 10:54:07 +03:00
Dmitriy Novozhilov
c8a1b876e8
[NI] Fix completion of error delegates with receiver with type parameters
2019-12-26 10:54:07 +03:00
Dmitriy Novozhilov
e83941a98e
[NI] Don't resolve delegates twice
...
#KT-31219 Fixed
#KT-31679 Fixed
#KT-32249 Fixed
2019-12-26 10:54:06 +03:00
Dmitriy Novozhilov
0c01499d98
[NI] Improve completing calls with multiple postponed arguments
...
#KT-27999 Fixed
#KT-30244 Fixed
#KT-31102 Fixed
2019-12-26 10:53:03 +03:00
Aleksey Kladov
0aa527347d
Stubs don't break KtTypeAlias::isTopLevel
...
`foo ?: bar is baz` is parsed as `(foo ?: bar) is baz`. So, if stub is non-null, this always returns `False`, because `Boolean` is definitely not a `KtFile`. See https://pl.kotl.in/6DtggcImf
This Kotlin's "most vexing parse" badly needs a diagnostics.
2019-12-26 10:36:40 +03:00
Dmitry Petrov
08454aa47e
Minor: add reference to language design issue
2019-12-26 10:31:12 +03:00
Mark Punzalan
2dd8727baf
[JVM IR] ForLoopsLowering: Keep IMPLICIT_NOTNULL type-casts in next()
...
and `componentN()` calls.
There were issues when we have iterables from Java where the element
type has "not null" type information.
2019-12-26 10:11:18 +03:00
pyos
e54ef3bdb8
PSI2IR: ignore enum annotation arguments of error type
...
Similar to references to error type, this may happen if library A uses
an entity from library B annotated with an annotation from C, but A is
compiled without C on the classpath.
2019-12-26 10:10:29 +03:00