Commit Graph

42431 Commits

Author SHA1 Message Date
Mikhail Glukhikh 64a51fe0d1 Implicit this inspection: minor cleanup 2017-11-02 14:07:46 +03:00
Kirill 89c4196c06 Add inspections for implicit and explicit 'this' #KT-4580 Fixed 2017-11-02 14:07:45 +03:00
Ilmir Usmanov 817f79520a Implement coroutineContext intrinsic
This intrinsic allows coroutine to access its context without suspention
and, furthermore, disabling tail-call optimization.
KT-17609: Fixed
2017-11-02 12:45:24 +03:00
Toshiaki Kameyama 0fffb9fb17 Introduce inspection for callables with implicit 'Nothing?' type
Inspection is reported only for vars and open callables
So #KT-21023 Fixed
2017-11-02 12:21:14 +03:00
Mikhail Glukhikh bcbeab00d5 Slightly change IntentionBasedInspection status
Only constructor and not the whole class is now deprecated
2017-11-02 12:21:13 +03:00
Toshiaki Kameyama 9ea9ea1008 Add quick fix to add required target to annotation #KT-20484 Fixed 2017-11-02 11:07:53 +03:00
Toshiaki Kameyama 204d9e3423 Introduce inspection detecting self-assignment of properties
So #KT-20714 Fixed
2017-11-02 11:07:52 +03:00
Vyacheslav Gerasimov ffa9478d0c Configure Kotlin: add mavenCentral() to repositories
Since kotlin stdlib depends on artifacts from mavenCentral() we should add it
 #KT-18719 Fixed
2017-11-01 23:57:20 +03:00
Ilya Gorbunov 093f796fc7 Write compiler and stdlib versions from gradle build 2017-11-01 17:26:18 +03:00
Ilya Gorbunov 6fe299cd5b Fix core:builtins:serialize task outputs 2017-11-01 17:09:10 +03:00
Ilya Gorbunov be63f09f8f Remove some workarounds for extra properties and signing,
use new syntax for maven repo definition.
2017-11-01 17:09:10 +03:00
Ilya Gorbunov 4d4285824b Use Gradle 4.3 2017-11-01 17:09:10 +03:00
Dmitry Savvinov e17610f378 Don't throw on recursion when computing member scope
When recursion is detected while computing
`ClassResolutionScopesSupport.scopeForMemberDeclarationResolution`,
create 'ThrowingLexicalScope' (as with other scopes), instead of
throwing ISE immediately. That allows to report error properly in cases
like in KT-18514

#KT-18514 Fixed
2017-11-01 15:57:56 +03:00
Simon Ogorodnik d6143e2af6 Fix testData broken after KT-12797 2017-10-31 21:11:19 +03:00
Simon Ogorodnik 0a4860b4d7 Add instrumentation to locate not cleared MockApplication 2017-10-31 20:25:00 +03:00
Mikhail Glukhikh f6a7327758 Remove ultimate tests from "Generate All Tests" configuration 2017-10-31 18:21:53 +03:00
Mikhail Glukhikh 50ebcfe09e Test generator: return back forgotten convert line separators 2017-10-31 18:05:20 +03:00
Dmitry Petrov c2b9803933 Generate source information for synthesized data class members
For now, bind such elements to data class declaration.

 #KT-20443 Fixed
2017-10-31 17:34:32 +03:00
Dmitry Jemerov 44260cdc7c Working recognition of JUnit annotation in MP tests
(cherry picked from commit 3a21781)
2017-10-31 14:45:09 +01:00
Alexander Udalov 2ed3e88561 Create descriptors with Kotlin package name in decompiler/cls stub builder
(cherry picked from commit b2620d1)
2017-10-31 14:44:52 +01:00
Dmitry Jemerov f93f502ebe Read package name in KotlinClassHeader and use it in decompiler
(cherry picked from commit 119d5ab)
2017-10-31 14:44:39 +01:00
Mikhail Glukhikh d59276671f Related to KT-20631: don't report redundant blank Unit in lambda 2017-10-31 16:38:55 +03:00
Toshiaki Kameyama 0fd4cdb086 Fix false positive for "redundant super" in data class #KT-20981 Fixed 2017-10-31 15:15:19 +03:00
Mikhail Glukhikh 63ad89eeb0 Minor cleanup 2017-10-31 15:03:55 +03:00
Toshiaki Kameyama ef71f7707d Introduce inspection to detect use of Unit as a standalone expression
So #KT-20631 Fixed
2017-10-31 14:51:06 +03:00
Toshiaki Kameyama 5f4233e4bf Don't suggest "Remove explicit type specification" for an annotated type
So #KT-20622 Fixed
2017-10-31 14:37:36 +03:00
Alexander Udalov fbda2a4343 Do not use MockLibraryUtil in AbstractTopLevelMembersInvocationTest
MockLibraryUtil runs the compiler in the new class loader, which is
useful for IDE tests to avoid loading KotlinCoreEnvironment, but is not
needed and is suboptimal for compiler tests.

Also use another method in AbstractForeignAnnotationsTest to assert that
there are no files in the compiled libraries
2017-10-31 07:36:46 +01:00
Alexander Udalov a64fc10e94 Extract compiler-executing code in AbstractCliTest to CompilerTestUtil 2017-10-31 07:36:46 +01:00
Alexander Udalov 8695c6a1e4 Extract GenerateCompilerTests out of GenerateTests
Rename the run configuration "Generate Tests" -> "Generate All Tests"
2017-10-31 07:36:46 +01:00
Alexander Udalov d0274c3c53 Extract 'test-generator' module out of 'generators'
Also avoid using intellij API where kotlin-stdlib can be used instead
2017-10-31 07:36:45 +01:00
Alexander Udalov d79b571781 Rename ultimate's GenerateTests -> GenerateUltimateTests, regenerate 2017-10-31 07:36:45 +01:00
Alexander Udalov 8786c951a6 Move compiler/tests-common-jvm6/{src -> tests}, adjust dependencies 2017-10-31 07:36:45 +01:00
Alexander Udalov 33549362cb Move compiler/tests-common/{src -> tests}, adjust dependencies 2017-10-31 07:36:45 +01:00
Alexander Udalov c2276e2ccb Rename module ':compiler.tests-common' -> ':compiler:tests-common' 2017-10-31 07:36:45 +01:00
Alexander Udalov ef00807a18 Refactor test class name computation in GenerateTests
Allow to pass the FQ name of the base test class, instead of the Class
object (to avoid dependencies on other modules)
2017-10-31 07:36:45 +01:00
Dmitry Jemerov c009f94eea Restore task dependency which is needed to run the plugin correctly 2017-10-31 02:48:18 +01:00
Alexander Udalov 959299eeab Use project.findProperty instead of project.property where nullable is fine
findProperty throws MissingPropertyException if there's no such property
2017-10-30 15:53:06 +01:00
Alexander Udalov ccd7bfa337 Add project property to change port for codegen tests on different JDKs 2017-10-30 15:40:17 +01:00
Alexander Udalov 152bcda2c8 Regenerate gradle/project-schema.json 2017-10-30 15:39:53 +01:00
Alexander Udalov dfd24d166c Update bootstrap to 1.2.0-dev-439 2017-10-30 15:38:38 +01:00
Simon Ogorodnik 213ce01152 Update testData for completion, broken after KT-13220 2017-10-30 17:31:15 +03:00
Ilya Gorbunov f878fa69c1 Android codegen tests: fix android SDK path in local.properties
The path should have slashes instead of backslashes even on Windows.
2017-10-30 16:48:39 +03:00
Ilya Gorbunov 1af692c957 Code style settings format changed in IDEA 173 2017-10-30 16:46:24 +03:00
Dmitry Petrov cbef372e69 Recapture shared variables when calling local class constructor
When a local function or class A creates an instance of a local class B
capturing an outer variable 'x', it should use ref for 'x', but not the
value of 'x'.
2017-10-30 15:19:13 +03:00
Dmitry Petrov 7a156e4407 Give unique names to fields for captured local functions
When a local function is captured, corresponding field accesses are
later transformed by the inliner. It doesn't have enough information to
restore the original semantics completely, so it has to rely on field
names. Local functions can be overloaded or can have names matching
local variable names, in both cases we generated fields with the same
name for captured values.

Now, we use the same '$<local-class-number>' suffix for field names for
local functions as it is present in the corresponding local class name.
This allows to distinguish captured local functions from captured local
variables and between different overloads of a function with the same
name.

 #KT-19827 Fixed
 #KT-18639 Fixed
2017-10-30 15:19:13 +03:00
Dmitry Petrov da99a100cc Additional constructor call normalization tests 2017-10-30 15:19:13 +03:00
Mikhail Glukhikh 149daa173c Do not report "unused receiver" on operator and infix functions
So #KT-16340 Fixed
2017-10-30 15:07:39 +03:00
Alexander Udalov 54990e16c1 Report error if tools.jar is not found in javac-wrapper 2017-10-30 12:36:55 +01:00
Mikhail Glukhikh 561d7749b1 Choose implementing module correctly in "create actual fix"
Take implements / expectedBy dependency into account
So #KT-20803 Fixed
2017-10-30 14:13:10 +03:00
Mikhail Glukhikh f0da58531e Enhance AbstractQuickFixMultiModuleTest
Handle same files at different source roots correctly
2017-10-30 14:12:27 +03:00