Commit Graph

42866 Commits

Author SHA1 Message Date
shiraji 5d44037a2b Support 'it op something' case in "redundant let" #KT-21373 Fixed 2017-12-05 19:23:44 +03:00
Ramon Wirsch f961f33f9d Fix for KT-19188
Fixes nondeterministic Default Method Order under existance of generic
type parameters.
SubstitutingScope did not respect source code method order by not using
a LinkedHashSet
2017-12-05 18:33:22 +03:00
Mikhail Glukhikh 8257e14055 J2K: perform additional isActiveFor check before applying inspections 2017-12-05 18:21:22 +03:00
Mikhail Glukhikh 7eb62b9ca4 Add kapt as test runtime dependency to J2K 2017-12-05 18:18:48 +03:00
Mikhail Glukhikh a90e3c2e45 Add "replace map.put with assignment" to J2K
Related to KT-21502
2017-12-05 18:18:25 +03:00
Dereck Bridie 8c305a137f Introduce inspection "replace map.put with assignment" #KT-21502 Fixed 2017-12-05 16:57:36 +03:00
Nikolay Krasko ab28bdf32f Store in test data failure for quotedName name 2017-12-05 16:07:55 +03:00
Nikolay Krasko 57d62eb74a Document error behaviour of evaluate expression lost sometime 2017-12-05 16:07:54 +03:00
Nikolay Krasko b21fb1a375 Replace assertTrue with assertEquals in AbstractKotlinEvaluateExpressionTest 2017-12-05 16:07:53 +03:00
Nikolay Krasko 04e6aa76cf Fix lint apiCheck lint 2017-12-05 16:07:53 +03:00
Dmitry Petrov 3d473f608e Add more tests for for-in-array
#KT-21354 Fixed Target versions 1.2.20
 #KT-21321 Fixed Target versions 1.2.20
2017-12-05 15:45:20 +03:00
Dmitry Petrov e4ecc13e13 Generate for-in-array loops with proper semantics in 1.3+
In Kotlin 1.3+, assignment to the for-in-array loop range variable in
the loop body doesn't affect loop execution (as if it was a loop on an
array iterator, or some other container).

 #KT-21354 In Progress
 #KT-21321 In Progress
2017-12-05 15:45:20 +03:00
Dmitry Petrov 7a6f80606b Warn on for-in-array range variable assignment in loop body
According to KT-21354, this should be a warning in 1.2 and before, and
no warning (with changed semantics) in 1.3 and later.
NB there are some false positives in this check.

 #KT-21354 In Progress
 #KT-21321 In Progress
2017-12-05 15:45:20 +03:00
Mikhail Glukhikh 7118a4bf80 Fix KNPE in "introduce variable", add some name conflict introduce tests
So #KT-21530 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh 20b48ab90c Fix suggested names in Spring (do not take same parameter into account) 2017-12-05 15:29:45 +03:00
Mikhail Glukhikh b09465ca0b Unnecessary variable: do not suggest in case of name duplication
So #KT-20300 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh 844dd1c43c Refactoring: Unnecessary variable inspection 2017-12-05 15:29:45 +03:00
Mikhail Glukhikh 52053695fe Fix variable name validator (take parameters into account) 2017-12-05 15:29:44 +03:00
Toshiaki Kameyama e341ec969f "Join declaration and assignment" should remove 'lateinit' for 'var' #KT-21603 Fixed 2017-12-05 11:19:58 +09:00
Ilya Chernikov 075203ad33 Make embedding javaslang into compiler intransitive, as it was before gradle
fixes KT-21537

(cherry picked from commit cc5c1d5)
2017-12-04 14:47:53 +01:00
Mikhail Glukhikh ac3542c041 Minor cleanup 2017-12-04 15:58:13 +03:00
Toshiaki Kameyama 74d83997c7 Fix false "function is never used" for functions with '@JvmName'
So #KT-20435 Fixed
2017-12-04 15:58:13 +03:00
Denis Zharkov 84282035b0 Set up projectTest.workingDir for incremental-compilation-impl 2017-12-04 15:21:03 +03:00
Mikhail Glukhikh fb8dc7b590 Minor cleanup 2017-12-04 15:16:04 +03:00
Toshiaki Kameyama 0eec3ef1f8 Add / preserve semicolon after empty companion object #KT-21179 Fixed 2017-12-04 15:15:49 +03:00
Alexey Andreev 45e5cc190f Update DCE limits in JS tests 2017-12-04 11:25:39 +03:00
Dmitry Petrov 0db6e5c3f3 Fix SAM wrapper generation in secondary constructor calls
Should simply invoke 'checkSamCall' in corresponding visitor method to
check if call arguments should be wrapped.
2017-12-04 10:29:33 +03:00
Dmitry Petrov 3431a1445c Fix enum entry class delegating constructor call generation
When the enum entry requires a specific class, its constructor should
invoke proper supertype constructor (from the corresponding enum class).
Corresponding resolved call should be passed from the front-end in
CONSTRUCTOR_RESOLVED_DELEGATION_CALL slice.
In case of enum entries without explicit supertype initializer, this
information was missing.
2017-12-04 10:29:33 +03:00
Ilmir Usmanov d8c4d19152 Make suspendCoroutineOrReturn ordinary function 2017-12-01 20:18:04 +03:00
Yan Zhulanow 0b37c9e83c Kapt: Report about of time spent in each annotation processor in verbose mode (KT-21542) 2017-12-01 22:53:22 +09:00
Yan Zhulanow ef6be206d0 Kapt: Clear URL cache after changing annotation processor JAR 2017-12-01 22:53:22 +09:00
Yan Zhulanow 84a766de24 Kapt: Register AP classpath as an input for "generate stubs" and "kapt" tasks
...so if the annotation processor artifact is changed, annotation processing will be relaunched.
2017-12-01 22:53:22 +09:00
Yan Zhulanow 9e43992094 Minor: Update kapt converter test for imports 2017-12-01 22:53:21 +09:00
Yan Zhulanow 3dc7502b0b Kapt, minor: Remove kaptError with location, it doesn't do anything reasonable now anyway 2017-12-01 22:53:21 +09:00
Yan Zhulanow a4a7db06d2 Kapt: force resolve import references in partial analysis mode (required for import conversion in correctErrorTypes) 2017-12-01 22:53:21 +09:00
Yan Zhulanow 1a3317ae2b Kapt: Attach generated classes directory as library source (KT-19823)
This may seem like a magic, but actually it's deadly simple.

GradleProjectResolver.mergeLibraryAndModuleDependencyData() tries to find a better substitution for the absolute BINARY paths, but actually makes things worse in our case.
GradleProjectResolver checks if the provided path is in the Gradle project output path list, and if the answer is yes, then it replaces our path to a Gradle Project (or a module in JPS terminology) dependency.
2017-12-01 22:53:21 +09:00
Yan Zhulanow 2e17c0b7f1 Kapt: Filter out non-package all-under imports whenever possible in "correctErrorTypes" (KT-21359) 2017-12-01 22:53:21 +09:00
Yan Zhulanow 00bb38fbb1 Kapt: Support import directive with aliases in "correctErrorTypes" mode (KT-21358) 2017-12-01 22:53:21 +09:00
Yan Zhulanow c7645bcf03 Kapt: Replace error.NonExistentClass usages to Object (as it does not break class hierarchies) 2017-12-01 22:53:21 +09:00
Yan Zhulanow e46fe9b255 Kapt: Do not add duplicating library entries in project importing 2017-12-01 22:53:20 +09:00
Yan Zhulanow 3d1ca61f9f Kapt: Remove artificial KaptError exception on errors from annotation processor (KT-21262) 2017-12-01 22:53:20 +09:00
Yan Zhulanow 0a0de8da29 Kapt: Fix correctErrorTypes for getters of properties defined in the primary constructor 2017-12-01 22:53:20 +09:00
Yan Zhulanow 182c2e2eeb Kapt: Launch integration tests also under Java 9 2017-12-01 22:53:20 +09:00
Yan Zhulanow 6ccf361942 Kapt: -Xmaxerrs javac option is not propagated properly (KT-21264) 2017-12-01 22:53:20 +09:00
Yan Zhulanow 2819fc718a Parcelable: Migrate to canonical NEW-DUP-INVOKESPECIAL form (KT-20545) 2017-12-01 22:53:20 +09:00
Yan Zhulanow 37543deefa Kapt: Keep KDoc comments in Java stubs (KT-21205) 2017-12-01 22:53:19 +09:00
Yan Zhulanow af57ab8119 Kapt: Fix remaining issues with Java 9 compatibility in converter, add Java 9 tests 2017-12-01 22:53:19 +09:00
Yan Zhulanow dde87ae1f9 Attempt to fix Gradle project importing error on older Gradle versions (KT-20967) 2017-12-01 22:53:19 +09:00
Yan Zhulanow 49db1bfe5d Introduce preliminary check for special annotations (allopen/noarg/samWithReceiver) (KT-21194) 2017-12-01 22:53:19 +09:00
Yan Zhulanow ecfb045790 Android Extensions: Do not generate synthetic components in Kotlin Bytecode tool window when the Gradle plugin is disabled 2017-12-01 22:53:19 +09:00