Commit Graph

42405 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh cfd432614f Cleanup: QuickFixMultiModuleTest 2017-10-30 14:12:25 +03:00
Mikhail Glukhikh 64dbe07fdb Cleanup: UnusedReceiverParameterInspection 2017-10-30 14:12:16 +03:00
Alexey Andreev 1f643ddce8 JS: add test to prove that KT-11910 is not reproducible anymore 2017-10-30 13:12:12 +03:00
Alexey Andreev 6b43465ed8 JS: add tests to check if super.equals/hashCode works properly
See KT-8226
2017-10-30 13:12:10 +03:00
Alexey Andreev e9e01b70a8 JS: fix super access to simple non-overridable properties
See KT-7653
2017-10-30 13:12:09 +03:00
Alexey Andreev e488cf13ad JS: fix FE crashing when type argument count less than parameter count
See KT-20908
2017-10-30 13:10:35 +03:00
Alexey Andreev a6e98c30d7 JS: fix crash when js function contains assignment with bad LHS
Fix KT-20905
2017-10-30 13:08:35 +03:00
Nicolay Mitropolsky a11cf253df UAST: correct processing of string literals in string literals (KT-20990) 2017-10-30 11:29:51 +03:00
Yoshinori Isogai 11f9c055fd KT-20591: Show annotations in parameter info (#1358)
Show annotations in parameter info

 #KT-20591 Fixed
2017-10-27 22:59:04 +03:00
Alexander Udalov 2c4e023cba Minor, use extracted variable in LateinitIntrinsics.kt 2017-10-27 18:06:43 +02:00
Nikolay Krasko d75656d571 Additional tests for overloads with type aliases and suspend
Failed attempts to reproduce KT-20782, but still may be useful.
2017-10-27 15:09:52 +03:00
Nikolay Krasko 2d7fe98e55 Don't resort deserialized descriptors based on renderer, preserve proto order
Use only names and types for sorting. Otherwise if deserialized descriptor
is rendered different from origin we might get Psi-Stub mismatch error.

Use the original proto order for declarations with same name and kind.

 #KT-20782 Fixed
 #EA-109887 Fixed
2017-10-27 15:09:04 +03:00
Nikolay Krasko 1408c4bd44 Fix testdata for ParcelQuickFixTestGenerated 2017-10-27 14:56:03 +03:00
Nikolay Krasko 3186c31ba7 Initialize delegate runner before access in filter method 2017-10-27 14:56:02 +03:00
Denis Zharkov 2df4d9496a Fix incorrect UNINITIALIZED_ENUM_COMPANION diagnostic
#KT-20959 Fixed
2017-10-27 09:36:00 +03:00
Sergey Ryabov b3b08514c5 Use consistent explicit FileTreeWalk named parameters 2017-10-27 05:38:43 +03:00
Artem Zinnatullin b565b00930 Fix Gradle plugin task name in readme. 2017-10-27 02:55:44 +03:00
Sergey Ryabov d6504d82b7 Fix the doc for String.format and String.Companion.format 2017-10-27 02:53:09 +03:00
Ilya Zorin 5541634187 Explicitly set utf-8 encoding for JavaCompile tasks 2017-10-26 21:34:50 +03:00
Ilya Gorbunov e8e09dbbf8 Various improvements in collection samples #KT-20357
Merge some related samples,
add sample for building a sequence from Enumeration similar to building a list from Enumeration.
2017-10-26 21:28:47 +03:00
Alexey Belkov 72354559e5 Provide samples for list, collection and array related functions #KT-20357 2017-10-26 21:28:47 +03:00
Alexey Sedunov 97332aaeea MPP: Support Mocha/Protractor run configuration for common modules
This is useful when they are implemented by JavaScript modules
2017-10-26 20:59:40 +03:00
Alexey Sedunov 3319fdba6d Gradle: Import test output path for JavaScript modules 2017-10-26 20:59:40 +03:00
Nikolay Krasko ef274ad43b Don't build light classes when usages in Kotlin local scope requested 2017-10-26 17:58:07 +03:00
Nikolay Krasko 189e2506d1 Refactoring: extract isOnlyKotlinSearch function 2017-10-26 17:58:06 +03:00
Nikolay Krasko 55996fa43d Minor: extract scope initialization out of cycle 2017-10-26 17:58:05 +03:00