Commit Graph

54924 Commits

Author SHA1 Message Date
Mikhail Glukhikh b28207deca FIR2IR: support fields in Java FIR 2019-05-23 14:02:09 +03:00
Simon Ogorodnik 6c313895df [FIR] Do not enhance java fields to firProperty 2019-05-23 14:02:09 +03:00
Simon Ogorodnik 397aaa189e [FIR] Allow type-variables in general subtyping with cone context 2019-05-23 14:02:09 +03:00
Simon Ogorodnik 20ba15a429 [FIR] Typing for annotation calls 2019-05-23 14:02:09 +03:00
Simon Ogorodnik c168c22fba Render property accessors in html fir dump 2019-05-23 14:02:09 +03:00
Simon Ogorodnik 9266a2cdba Add equals/hashCode to some FIR cone types 2019-05-23 14:02:08 +03:00
Simon Ogorodnik aa96837758 [FIR] Introduce unchecked not-null cast as internal operation for !!, ?: 2019-05-23 14:02:08 +03:00
Simon Ogorodnik b469eb293b [FIR] Typing for try-catch 2019-05-23 14:02:08 +03:00
Simon Ogorodnik 30e097a1e0 Fix modifiers order and repeating in html fir dump 2019-05-23 14:02:08 +03:00
Simon Ogorodnik 58fd62fd49 Fix try catch rendering in html fir dump 2019-05-23 14:02:08 +03:00
Simon Ogorodnik 9398addb9d Fix cycle avoidance in FIR implicit type resolve
This commit fixes the following case:
transformer visiting it twice before reporting cycle
fun foo() = foo()
2019-05-23 14:02:07 +03:00
Mikhail Glukhikh 26974788e9 FIR2IR converter: handle receivers and parents more correctly 2019-05-23 14:02:07 +03:00
Mikhail Glukhikh 90009f002c Add FIR test for 'Exception' constructor resolve ambiguity (type alias) 2019-05-23 14:02:07 +03:00
Mikhail Glukhikh b72f3aa206 Remove code duplication in KotlinToJvmCompiler (old FE vs FE IR)
Related to KT-31265
2019-05-23 14:02:07 +03:00
Mikhail Glukhikh 05154d24d4 Select stub or real symbol for java.lang.Class in IR dependent on mode
This commit fixes some black-box IR tests broken by stub introduction
2019-05-23 14:02:07 +03:00
Mikhail Glukhikh f4fdc66a34 Introduce experimental FIR compiler #KT-31265 Fixed
This commit also includes several FIR2IR fixes which helps FIR compiler
to produce normal results
2019-05-23 14:02:06 +03:00
Mikhail Glukhikh 892419c08a Generate stub java.lang.Class in IR JvmSymbols instead of scope reading
Before this commit, java.lang.Class was read via JvmBackendContext,
its module descriptor and its package member scope.
However, this works only for old FE with descriptors and
descriptor-based scopes available.
2019-05-23 14:02:06 +03:00
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