Commit Graph

38021 Commits

Author SHA1 Message Date
Dmitry Petrov 2a97fb17ba Fix source information mapping in PsiSourceManager
Add tests for source information mapping

KT-17108 source information corrupted on PSI -> IR transformation
2017-03-29 13:03:38 +03:00
Anton Bannykh 4086a84622 JS: add suffix '_test' to test module output files to avoid name conflicts (KT-16979)
Also stop setting AMD module ids explicitly.
2017-03-28 21:44:56 +03:00
Anton Bannykh 867bd13ce4 JS: make tests dependent on primitive array is checks pass even when -Xtypedarray is disabled (related: KT-17137) 2017-03-28 21:41:20 +03:00
Anton Bannykh 7d4c26c0c1 JS: fix maven SeleniumTest 2017-03-28 21:23:21 +03:00
Pavel V. Talanov df71116dc5 KtLightElements: fix KtLightMember not extending KtLightDeclaration
Fix problem introduced in 4b85fd9fbe
2017-03-28 19:47:13 +03:00
Dmitry Jemerov 6febe1e8a2 Convert RenameTest to light fixture test case
Extract multi-module rename test to a separate class.
2017-03-28 15:48:38 +02:00
Yan Zhulanow 228b3c56a3 Minor: fix failing CliTestGenerated#testPluginSimple test
Add missing Android Dialog stub cause Android Extensions plugin now generates the synthetic property for Dialog.
2017-03-28 16:08:46 +03:00
Dmitry Jemerov 8ec70f44dc Log fallbacks to plain text search when searching expressions of type
This will help diagnose performance problems in IDEA inspections.
2017-03-28 13:00:56 +02:00
Dmitry Jemerov f13c1b8d87 Convert MultiFileIntentionTest to light fixture test case 2017-03-28 11:36:29 +02:00
Alexey Andreev de58786fcc Regenerate LightAnalysisModeTestGenerated 2017-03-28 11:32:47 +03:00
Alexey Andreev 8fe96664b7 Fix initialization order of enum with companion object in JS BE
Make enum entries initialize before companion object. This helps
in situation when companion object initializer refers to enum fields.
JVM be generates <clinit> method which first initializes all enum fields
and then runs companion object initializer. This commit introduces the
similar behaviour in JS BE. The old behaviour was: initialize companion
object in constructor. In enum, constructor is called to initialize
enum fields, so previously companion object was initialized first,
which is incorrect.

See KT-16745
2017-03-28 11:32:46 +03:00
Alexey Andreev 0606ebe0dc Fix suspend function with default argument
In JS BE, fix translation of suspend function with default argument
inherited from interface.

See KT-16658
2017-03-28 11:32:45 +03:00
Alexey Andreev 6ba3812582 Fix inlining of tail call suspend function
When inlining tail-call suspend function to regular
suspend function in JS BE, don't forget to insert suspension point.
See KT-16951
2017-03-28 11:32:45 +03:00
Alexey Andreev 466540399c Fix translation of copy() fun in data class
Fix translation of copy() function in data class which has secondary
constructor in JS BE. See KT-16717.
2017-03-28 11:32:44 +03:00
Mikhail Zarechenskiy b46205f60b Add tests to check collection literals with varargs 2017-03-28 09:01:57 +03:00
Sergey Igushkin ae2b4f5ff2 Support omitting version of org.jetbrains.kotlin dependencies
Related to #KT-12792
2017-03-28 03:57:38 +03:00
Sergey Igushkin 9ba84df954 Fixed classes copying fail in cases when destinationDir has changed
Added @Input to the property returning classes dirs: it will make
Gradle fall back to non-incremental input when the property value
changes.

Issues: #KT-16820 Fixed
2017-03-28 03:53:11 +03:00
Jonathan Leitschuh cc0ac36fed Java IC compatibility fix for Gradle 2.14+
Added version check to switch between old and new approaches because
Gradle versions before 2.14 have a bug in Java IC.
Added Kotlin classes to Java task input.
Added  annotationsFile into task input to include it into up-to-date check.

Related issues: #KT-16585 Fixed
2017-03-28 03:47:21 +03:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Vyacheslav Gerasimov ba5e78a917 Replace deprecated Iterators.emptyIterator() in JavaContext.java
with ContainerUtil.emptyIterator()
2017-03-27 21:35:11 +03:00
Pavel V. Talanov ca6516c2a2 findDecompiledDeclaration: find builtIns more accurately
Use resolveScope of a reference to help searching for builtIn binaries
Do not search non-builtIn descriptors in random scopes
2017-03-27 21:24:45 +03:00
Dmitry Jemerov 265e765ec9 Allow to exclude specific qualified names from import in tests
In tests, ImportFix imports the first available candidate. This can
lead to non-deterministic tests when multiple candidates are available.
With this fix, unwanted candidates can be excluded.
2017-03-27 19:48:59 +02:00
Dmitry Jemerov 88372132be Delete Android facet in teardown 2017-03-27 19:48:58 +02:00
Dmitry Jemerov 79c814636e Convert AddOpenToClassDeclarationTest to regular multifile quickfix test 2017-03-27 19:48:52 +02:00
Dmitry Jemerov 4f229c3fdc Convert AbstractQuickFixMultiFileTest to light fixture test case 2017-03-27 19:48:51 +02:00
Dmitry Jemerov 387dbdf3bb AbstractQuickFixMultiFileTest: J2K 2017-03-27 19:48:50 +02:00
Dmitry Jemerov d11ea64f00 AbstractQuickFixMultiFileTest: rename to .kt 2017-03-27 19:48:49 +02:00
Dmitry Jemerov e2f75463d7 Rewrite AbstractQuickFixTest based on light fixture test case
Don't reconfigure runtime before every test. For consistency,
mark tests that require the runtime with directives instead of relying
on test file names.
2017-03-27 19:48:43 +02:00
Dmitry Jemerov 34ad19a912 AbstractQuickFixTest: J2K 2017-03-27 19:45:50 +02:00
Dmitry Jemerov ad59a122ac AbstractQuickFixTest: rename to .kt 2017-03-27 19:45:50 +02:00
Dmitry Jemerov 9d74657f11 Mark KotlinCodeInsightTestCase as deprecated 2017-03-27 19:45:50 +02:00
Dmitry Jemerov 9a5028c4f2 Convert KotlinShortNamesCacheTest to light test case; cleanup code 2017-03-27 19:45:50 +02:00
Dmitry Jemerov 159c2382b4 Convert KotlinChangeSignatureTest to light test case 2017-03-27 19:45:50 +02:00
Dmitry Jemerov e9998aa329 AbstractResolveByStubTest: convert to light test case 2017-03-27 19:45:50 +02:00
Dmitry Jemerov d8bbb8f2ef AbstractResolveByStubTest: J2K 2017-03-27 19:45:50 +02:00
Dmitry Jemerov 49aaa0edf6 AbstractResolveByStubTest: rename to .kt 2017-03-27 19:45:50 +02:00
Alexander Udalov ccd3781403 Disallow using named arguments for members of header classes
#KT-17083 Fixed
2017-03-27 20:10:18 +03:00
Alexander Udalov b971ac9312 Allow impl declarations to have flexible types
Types of the corresponding parameters (or type parameter bounds, types
in supertypes, etc) are now compatible not only if they're equal, but
also if values of those types are mutually assignable (if "a" is subtype
of "b" and "b" is subtype of "a")

 #KT-17005 Fixed
2017-03-27 20:10:17 +03:00
Alexander Udalov 116380a826 Allow impl declarations to have non-stable parameter names
#KT-17027 Fixed
2017-03-27 19:50:25 +03:00
Alexander Udalov 633798db18 Render incompatible impl member in "no impl for header" diagnostic 2017-03-27 19:50:25 +03:00
Alexander Udalov db1f039586 Serialize and deserialize 'header' modifier for descriptors
This fixes KT-17001 because now 'header' modifier is loaded correctly
for deserialized members and the standard disambiguation in
OverloadingConflictResolver.compareCallsByUsedArguments takes place,
where header members are discriminated against the corresponding impl
members

 #KT-17001 Fixed
2017-03-27 19:50:25 +03:00
Pavel V. Talanov ee33879031 Light class tests: hidden deprecated affects codegen
Provide fix later
2017-03-27 17:59:05 +03:00
Pavel V. Talanov e822a17c0d Lazy light classes: can't use laziness for classes with supertypes delegates 2017-03-27 17:59:03 +03:00
Pavel V. Talanov 2291d91109 KtLightMethod: isVarArgs() does not trigger exact delegate computation 2017-03-27 17:59:01 +03:00
Pavel V. Talanov c4be805962 Light members: allow to get modifier list without computing delegate 2017-03-27 17:58:59 +03:00
Pavel V. Talanov e84a674504 LazyLightClassDataHolder: rollback optimization on suspected inherited internal visibility
Internal visibility affects member names
2017-03-27 17:58:57 +03:00
Pavel V. Talanov ec895f18f2 Light classes: refactor, move getOrigin to corresponding classes 2017-03-27 17:58:55 +03:00
Pavel V. Talanov a2511232ab Lazy light classes: fix visibility modifier in case of inherited protected visibility 2017-03-27 17:58:53 +03:00
Pavel V. Talanov a81bac0b50 LightClassTest: test corner cases related to inherited visiblity
EA-99155
 #KT-16899 Fixed
2017-03-27 17:58:51 +03:00
Pavel V. Talanov 4b85fd9fbe Refactor light members: introduce KtLightMemberImpl
Holds common code for fields and methods
2017-03-27 17:58:49 +03:00