Commit Graph

54907 Commits

Author SHA1 Message Date
Ting-Yuan Huang 0aee2d0568 Fix signature generation for calls to enum and inner class constructors
The synthesized arguments caused the size of default value mask off by
one when it is close to the boundary of Int.SIZE, which in turn
resulted in wrong signature at call sites.
2019-05-23 12:29:57 +02:00
Ivan Gavrilovic 72fdc648ff If incremental KAPT is disabled, do not analyze classpath
When incremental apt mode in KAPT is disabled, do not analyze
classpath to determine the type of the annotation processors. Instead,
just mark them all as non-incremental.
2019-05-23 19:09:28 +09:00
Peter Xu a639607821 Revert obsolete code introduced in KT-12402
The classes being filtered have been renamed months ago. The change
committed in KT-12402 is no longer relevant as the underlying issue has
been fixed.
2019-05-23 19:09:28 +09:00
Ivan Gavrilovic b609fe529c Handle return result of dir creation/deletion in kapt
#KT-31322
2019-05-23 19:09:27 +09:00
Ivan Gavrilovic f60bfc34c0 Remove generated sources and classes for full KAPT build
When running incremental annotation processing in KAPT,
even if incremental flag is enabled, and full rebuild should
be performed (e.g. in presence of dynamic non-incremental APs),
make sure generated sources and classes are removed.

 #KT-31322 fixed
2019-05-23 19:09:27 +09:00
Vladimir Krivosheev 757b4b3910 Do not use constructor injection for app level extension KotlinClassWithDelegatedPropertyRenderer (KT-31266) 2019-05-23 19:09:27 +09:00
Yan Zhulanow a0778ad703 Revert "Kapt: Always use raw types for annotation parameter types (KT-30346)"
This reverts commit 66754e62
2019-05-23 19:09:27 +09:00
Yan Zhulanow 9a5bbcb00b Pill: Recognize 'embedded' configuration as 'compile' in JPS 2019-05-23 19:09:27 +09:00
Dmitriy Novozhilov 95544b0970 Add wrappers on KotlinType in EffectSystem
Also that commit removes usages of builtins inside
  effect system and starts refactoring of functor
  composition via composition instead of inheritance.

There are some changes in testdata related to inference of recursive
  functions with implicit return types.

After this commit they all are marked as unresolved. It happens because
  those functions have DeferredType as return type, and computing this
  type produces recursive exception, which provides “typechecker
  recursive problem” diagnostic.

Before this commit, function call was completed successfully, because
  call completer didn’t computed that type, and computation of DeferredType
  were triggered only in `DataFlowAnalyzer.checkType`.
Now, effect system tries to compute that type while wrapping KotlinTypes
  into ESTypes, and effect system itself is triggered in in call completer,
  so, call completion doesn’t finish and function call is marked as unresolved.

#KT-31364
2019-05-23 12:23:22 +03:00
Dmitriy Novozhilov fb77e1f0bd [NI] Fix recursion in contract declaration analysis.
#KT-30410 Fixed
2019-05-23 12:22:42 +03:00
Dmitriy Novozhilov 8d5c61f3ab [NI] Return error type for unsupported descriptors in callable reference inference 2019-05-23 12:22:42 +03:00
Dmitriy Novozhilov b4c8c79931 [NI] Add check for non-null argument type in arguments check
#KT-31461 Fixed
2019-05-23 12:22:42 +03:00
Dmitriy Novozhilov b323298b0e [NI] Remove deep types in commosn super type for recursive types
#KT-30411 Fixed
2019-05-23 12:22:42 +03:00
Dmitriy Novozhilov f54653eb2b [NI] Fix error type approximation in ILTApproximatorConfiguration
#KT-31441 Fixed
2019-05-23 12:22:42 +03:00
Sergey Rostov 6f9ef0d4b6 Gradle, js: fix js test frameworks DSL for groovy
#KT-31566 Fixed
2019-05-23 10:09:14 +03:00
Sergey Rostov ebe3ccee8b Gradle, test reports: NewMultiplatformIT.testJavaSupportInJvmTargets
"check" task, now creates aggregate report for all gradle versions,
so this test is affected too
2019-05-23 10:09:13 +03:00
Sergey Rostov 348e29f24b Gradle, tests: introduce kotlin.tests.individualTaskReports
This property required for getting individual junit.xml files that is
currently used in test run assertions.
2019-05-23 10:09:13 +03:00
Sergey Rostov 22bc99f527 Gradle, js, single platform projects: create single test aggregator
Extract KotlinTestsRegistry service for customizing aggregated test tasks
naming.
2019-05-23 10:09:13 +03:00
Sergey Rostov a5664207d5 Gradle, js, tests: always create a jsTest task for compatibility
This requires runnable aggregate test task even if there are not tests in it.
That, in turn, requires support aggregate test tasks hierarchy.
Also TestReport integrated in aggregate for all gradle versions (was for 5 only).

#KT-31527 Fixed
2019-05-23 10:09:13 +03:00
Sergey Rostov 78fe2fde33 Gradle, libWithTests test: check js tests running, add test results assertion 2019-05-23 10:09:13 +03:00
Sergey Rostov 709afdfa45 Gradle, testing test execution: support asserting reports from multiple tasks at once 2019-05-23 10:09:13 +03:00
Sergey Rostov a13f1a5e67 Gradle, js, webpack: fix compatibility with older gradle version 2019-05-23 10:09:12 +03:00
Sergey Rostov 603fb8a53d Gradle, js, npm: try fixing project version to semver
JS package managers requires it.

#KT-31563 Fixed
2019-05-23 10:09:12 +03:00
Ilmir Usmanov e7c78d8d7e Update bootstrap
Update reference public API. Before 266976ac1e
suspend inline functions with crossinline parameters were effectively
inline-only. Fixing it exposed suspendCoroutine as public API.
Update jps artifacts after bootstrap.
2019-05-23 09:28:31 +03:00
Ilya Kirillov ff774f6249 New J2K: Run nj2k tests by default 2019-05-22 22:20:18 +03:00
Ilya Kirillov 9ccedc5bc4 New J2K: Fix wrong line separators on windows
It causes some inspections in post-processing to work not properly
2019-05-22 22:20:18 +03:00
Ilya Kirillov f0012de6ea New J2K: add string method conversions 2019-05-22 22:20:18 +03:00
Ilya Kirillov 54432448e3 New J2K: correctly remove redundant property type in a case of nullable initializer 2019-05-22 22:20:17 +03:00
Ilya Kirillov 8f5c690cdd New J2K: do not convert var to val if super property is var 2019-05-22 22:20:17 +03:00
Ilya Kirillov fa8a067c85 Fix losing flexible type enhancement in type substituting
It breaks `org.jetbrains.kotlin.nj2k.NewJavaToKotlinConverterSingleFileTestGenerated.ToArray#testToArray` test due to losing external nullability annotations
2019-05-22 22:20:17 +03:00
Ilya Kirillov 0a974cd419 New J2K: remove unused dependency from nj2k-services 2019-05-22 22:20:16 +03:00
Ilya Kirillov c9decd5dc9 New J2K: correctly retrieve all type variables in printing 2019-05-22 22:20:16 +03:00
Ilya Kirillov 7db4958a17 New J2K: fix tests due to changes in inspections behaviour 2019-05-22 22:20:16 +03:00
Ilya Kirillov 37f8d72756 New J2K: make inner private constructors public when accessed 2019-05-22 22:20:16 +03:00
Ilya Kirillov 78fd56bdf0 New J2K: Fix running some post processings in incorrect thread
#KT-31234 fixed
2019-05-22 22:20:15 +03:00
Ilya Kirillov 90ab39f50f New J2K: Fix CCE in post processing
#KT-31217 fixed
2019-05-22 22:15:28 +03:00
Sergey Igushkin 8b150d2b07 Fix Android 3.3 Gradle integration tests running with low Gradle version 2019-05-22 18:11:18 +03:00
victor.petukhov d4515031de Report warning about implicitly inferred nothing only for return position
^KT-31535 Fixed
2019-05-22 15:45:59 +03:00
Roman Artemev 72f7287ad2 [IR BE] Fix array constructor loop. Use index parameter as immutable value 2019-05-22 15:18:13 +03:00
Roman Artemev dfa38f4a4d [JS IR BE] Fix state machine generation in case of composition of loops, inline functions and finally blocks
* lower finally blocks in any cases
 * do not optimize exit blocks for if-statements
2019-05-22 15:18:13 +03:00
Roman Artemev 9c7d47789c [JS IR BE] Implement type check for SuspendFunctionN 2019-05-22 15:18:13 +03:00
Steven Schäfer 9894c216c1 Fix test for static default methods in KotlinTypeMapper 2019-05-22 13:33:08 +02:00
Steven Schäfer cf13293363 Use FQ names for string plus intrinsic in FlattenStringConcatenationLowering 2019-05-22 12:14:43 +02:00
Alexander Udalov 43bf962d79 Fix CLI test data on -XXLanguage arguments
We should use '\:' instead of ':' because the latter is replaced to the
path separator in AbstractCliTest.readArg which is ';' on Windows.
2019-05-22 08:48:37 +02:00
Alexander Udalov d340f6dc62 Minor, simplify code in parseCommandLineArguments 2019-05-22 08:48:37 +02:00
Ilmir Usmanov effbcdaf70 Do not generate $$forInline suffix for enclosing method
in OUTERCLASS field.

The inliner generates two versions of suspend functions/lambdas in
inline functions: with state-machine and without. The former is used
to call the function from Java or via reflection and have ordinary
name, while the latter is used by inliner and have $$forInline suffix.
The inliner throws the state-machine version away, duplicates
$$forInline version and then call state-machine generator.

If these suspend functions/lambdas are not going to be inlined,
$$forInline version is not generated. However, all objects, which are
used in these suspend functions/lambdas, have $$forInline version
written to OUTERCLASS field. This leads to errors by proguard.
Since they are used in both state-machine version and for-inline ones,
we can simply remove $$forInline suffix from OUTERCLASS field and this
fixes the issue.

 #KT-31242 Fixed
2019-05-21 21:09:36 +03:00
Svyatoslav Kuzmich dd6bc100ed [JS IR BE] Don't detach assignment operator from receiver 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich 5495da5241 [JS IR BE] Allow empty call arguments only for external functions 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich e9ceee388e [JS IR BE] Don't transform toString with extension receiver 2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich 3153a7dd7e [JS IR BE] Fix boolean and/or generation 2019-05-21 19:19:31 +03:00