Alexander Udalov
f45ca7acd3
Add -Xno-use-ir to override useIR flag for custom-built compiler
2020-01-15 19:39:07 +01:00
Ilmir Usmanov
4fa8266606
Unconditionally remove $$forInline suffix from enclosing method
...
when transforming objects with suspend functions/lambdas, which
capture crossinline suspend lambdas. Since functions with the
suffix have a counterpart without the suffix, for java interop
and reflection call purposes, it is safe change.
#KT-31242 Fixed
2020-01-15 15:12:26 +01:00
Mikhail Glukhikh
7bcd3c4c13
[FIR] Introduce & use FirScopeProvider.getStaticMemberScopeForCallables
2020-01-15 16:52:13 +03:00
Mikhail Glukhikh
aaace40912
[FIR] Split Receiver/ReceiverValue, QualifierReceiver/ExpressionReceiver
2020-01-15 16:52:13 +03:00
Mikhail Glukhikh
42ba54fffd
[FIR] Add test for qualifier resolve priority
2020-01-15 16:52:12 +03:00
Mikhail Glukhikh
cef71b0349
[FIR] Add static / companion ambiguity to test data
...
This is temporary test data change until we prioritize this properly
2020-01-15 16:52:12 +03:00
Mikhail Glukhikh
f0ced642d9
[FIR] Use static & qualified scopes to access qualified callables
...
This commit provides more correct logic for creating scopes based
on FirResolvedQualifier & eliminates QualifiedReceiverTowerDataConsumer
2020-01-15 16:52:12 +03:00
Dmitry Petrov
6bbfb2ffe9
JVM: add tests for companion object accessor generation
2020-01-15 16:40:06 +03:00
Dmitry Petrov
3d85e5da5f
Enable ProperVisibilityForCompanionObjectInstanceField in 1.4
2020-01-15 16:40:06 +03:00
pyos
02722e0238
JVM_IR: mark the exception local as live only after the store
...
Otherwise, should the local coincide with another one, the incorrect
range causes D8 to generate invalid bytecode in debug mode.
2020-01-15 14:35:15 +01:00
Denis Zharkov
bcad6aeda6
Fix project compilation after fix for KT-35920
...
See KT-35931 for a feature request allowing to write IrConstImpl::int
2020-01-15 16:10:34 +03:00
Denis Zharkov
d4c34afb94
NI: Do not resolve static callable references on generic types
...
As they weren't resolved in old inference
^KT-35920 Fixed
2020-01-15 16:10:34 +03:00
Denis Zharkov
c48539feb3
NI: Fix callable references resolution when LHS is generic nested class
...
In case of null qualifier, we should not look into any static scope
NB: factory::createCallableProcessor returns NoExplicitReceiver processor
in case of null-receiver, that makes resolving the call in the test as
`property(::key)` that matches to the property itself, thus leading to
overload resolution ambiguity
^KT-35887 Fixed
2020-01-15 16:10:34 +03:00
Vladimir Ilmov
4ff8acf5d7
POC coroutine panel removed
2020-01-15 14:02:05 +01:00
Vladimir Ilmov
c8c0f3383d
[debug] coroutine's stack frame locations pre-calculated on initialization
2020-01-15 14:02:05 +01:00
Sebastian Schuberth
4191d1d699
Make NodeJsSetupTask and YarnSetupTask cacheable
...
For users that have Gradle's build cache [1] enabled, make NodeJsSetupTask
and YarnSetupTask cacheable to avoid the distribution archives being
downloaded again if they have been downloaded before by other builds of
other projects that apply the Kotlin plugin.
[1] https://docs.gradle.org/current/userguide/build_cache.html
2020-01-15 12:51:37 +01:00
Sebastian Schuberth
2760034281
NodeJsSetupTask: Check for the node executable instead of its directory
...
We want NodeJs to be downloaded again if nodeBinDir exists but the node
binary is missing.
Fixes https://youtrack.jetbrains.com/issue/KT-34989 .
2020-01-15 12:51:37 +01:00
Pavel Kirpichenkov
3fcf3d6fea
Add regression tests
...
KT-32358
2020-01-15 14:39:40 +03:00
Pavel Kirpichenkov
d36dd12f58
[NI] Restore old behaviour of AbstractPartialBodyResolveTest
...
Smartcasts between partial and full resolution mode should almost never match,
comparing smartcasted types in test runner is incorrect in general case.
Mute failing test until decision about correct behaviour (KT-35922).
2020-01-15 14:39:40 +03:00
Pavel Kirpichenkov
b9a1fc294c
[minor] Move quickFixUtil to util package
2020-01-15 14:39:40 +03:00
Pavel Kirpichenkov
69e800c695
Remove dependencies on data flow aware expression type in BindingContext
...
`BindingContext.getType`'s behaviour on argument expression has been different for OI and NI for some time.
New inference used to rewrite argument's type after smartcast, which led to missing subsequent smartcasts in some cases.
This commit makes retrieval of smartcasted argument type explicit.
2020-01-15 14:39:40 +03:00
Pavel Kirpichenkov
4d11fac365
[NI] Add restored smart casts to spec tests
...
KT-35668 Fixed
2020-01-15 14:39:40 +03:00
Pavel Kirpichenkov
396b226462
[NI] Restore missing smart casts after another smart cast in call
...
Expression type serves as a part of a key for retrieving smart cast info.
Rewriting expression type with SmartCastManager leads to incorrect processing of following smartcasts for same expression, therefore it was removed.
KT-32507 Fixed
KT-32358 Fixed
2020-01-15 14:39:40 +03:00
Mikhail Glukhikh
d3de2d419b
FIR2IR: fix failing enum entry test
2020-01-15 14:30:15 +03:00
Dmitriy Novozhilov
88a1cb5a17
[NI] Use new type substitutor instead of old in completion of callable references
...
It's necessary because of new type substitutor is eager than odl, so
if there is a substitution of type parameter deep inside type arguments
then second substitutor wins against first
#KT-35896 Fixed
2020-01-15 14:01:25 +03:00
Dmitriy Novozhilov
3428a17759
[NI] Postpone calls with not enough information in builder inference
2020-01-15 14:01:25 +03:00
Mikhail Glukhikh
f4b3e9b4b2
[FIR] Fix qualifier handling by FirQualifierNameResolver
2020-01-15 13:20:27 +03:00
Mikhail Glukhikh
ae774a0ab9
[FIR] Add test for qualified access to base class member case
2020-01-15 13:20:26 +03:00
Mikhail Glukhikh
c129714bf9
[FIR] Add test for inner class based qualifier case
2020-01-15 13:20:26 +03:00
Mikhail Glukhikh
33104a3ef8
[FIR] Add accidentally missed JvmMappedScope.processClassifiersByName
2020-01-15 13:20:26 +03:00
Igor Yakovlev
fb56e14654
Fix UAST method NPE for incomplete method PSI
...
Fixed #KT-35871
2020-01-15 13:14:41 +03:00
Leonid Startsev
9bd966c123
Supply correct Native platform for module descriptor while compiling from CLI
2020-01-15 12:48:49 +03:00
Leonid Startsev
f2026a49bb
Support .decodeSequentially call on JVM and Native and remove READ_ALL handling from all platforms
...
Fix codegen test
Ignore JVM IR codegen test for a while since it requires updated kotlinx-serialization-runtime in classpath
2020-01-15 12:46:25 +03:00
Steven Schäfer
cb98588202
Psi2Ir: Add an IrTextTest for enums with multiple constructors
2020-01-15 10:18:09 +01:00
Steven Schäfer
1b5109b6ee
JVM IR: Refactor EnumClassLowering
2020-01-15 10:18:09 +01:00
Steven Schäfer
b0e61ab470
JVM IR: Remove IrEnumValueOf intrinsic
2020-01-15 10:18:09 +01:00
Steven Schäfer
f8779ddf9d
Psi2Ir: Create instance initializer calls in enum class constructors
2020-01-15 10:18:09 +01:00
Steven Schäfer
83edc7fa73
IR: Remove unused argument from DeclarationFactor.getFieldForEnumEntry
2020-01-15 10:18:09 +01:00
Nicolay Mitropolsky
ed57a53ad6
191: Uast: fix compilation for 191
2020-01-15 11:40:47 +03:00
Alexander Udalov
b5afdc7553
Keep annotation FQ name in experimental API diagnostics
...
This fixes compilation of ExperimentalFixesFactory where this FQ name
is used to construct a correct quick fix instance.
2020-01-15 00:32:19 +01:00
Alexander Udalov
514bf3eec0
Deprecate Experimental/UseExperimental in favor of RequiresOptIn/OptIn
2020-01-14 21:04:44 +01:00
Alexander Udalov
f954a6c812
Support custom message in RequiresOptIn
...
#KT-34648 Fixed
2020-01-14 21:04:43 +01:00
Alexander Udalov
9187a85aaf
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in quickfix and IDE tests
2020-01-14 21:04:43 +01:00
Alexander Udalov
da077b5353
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in Gradle plugin
2020-01-14 21:04:42 +01:00
Alexander Udalov
8f94a2bb75
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in stdlib kdocs
2020-01-14 21:04:42 +01:00
Alexander Udalov
7742a3b697
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in compiler tests
2020-01-14 21:04:42 +01:00
Alexander Udalov
b839b905b5
Rename Experimental/UseExperimental in compiler diagnostic messages
...
#KT-34647
2020-01-14 21:04:41 +01:00
Alexander Udalov
d547af00aa
Fix NPE in ExperimentalUsageChecker in corner case
...
Since there's no nullability assertion, null could end up in this list
and cause NPE further at `reportNotAcceptedExperimentalities`. This
could happen if a declaration was annotated with WasExperimental, the
marker was annotated with the new RequiresOptIn, and API version 1.2 was
used.
No new tests are added because 1.2 is obsolete and WasExperimental is
internal.
2020-01-14 21:04:40 +01:00
Mads Ager
ca05ff1791
JVM_IR: Fix bug in suspend function with many default arguments.
2020-01-14 20:48:44 +01:00
Mark Punzalan
e46adbae29
[JVM IR] Fix checkLocalVariablesTableTest/parametersInSuspendLambda
...
for JVM IR.
2020-01-14 20:47:36 +01:00