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
Yan Zhulanow
8496ff8611
Minor: Add kotlin-android-extensions-runtime dependency to get rid of error messages in IDE
2017-12-01 22:53:19 +09:00
Yan Zhulanow
037caf3a17
Kapt: Prefer Kotlin diagnostic locations over ones from stubs
2017-12-01 22:53:19 +09:00
Yan Zhulanow
861d778530
Kapt: Fix 'correctErrorTypes' for primary constructor properties
2017-12-01 22:53:18 +09:00
Yan Zhulanow
7136bf7e0a
Kapt: Add Kotlin location to diagnostics reported in Kapt stubs
2017-12-01 22:53:18 +09:00
Yan Zhulanow
8fba19f269
Kapt: Do not print empty diagnostic messages
2017-12-01 22:53:18 +09:00
Yan Zhulanow
5efdf111f5
Kapt: Support type aliases in correctErrorTypes mode (KT-19402)
2017-12-01 22:53:18 +09:00
Yan Zhulanow
84e5fa38bb
Kapt: Exclude all primitive Java constants from inlining (String is still inlined) (KT-20878)
2017-12-01 22:53:18 +09:00
Yan Zhulanow
6ca5787799
Kapt: Allow to ignore specific methods/fields from being put into kapt stubs
...
Classes can't be ignored yet as it requires to ignore also all type usages which is a non-trivial operation.
2017-12-01 22:53:18 +09:00
Yan Zhulanow
fd84ecda54
Kapt: Add runtime library, move all modules inside the 'kapt3' directory
2017-12-01 22:53:17 +09:00
Yan Zhulanow
b74ef72af7
Kapt: Forbid illegal Java identifiers in Enum value literals
2017-12-01 22:53:17 +09:00
Yan Zhulanow
f52749741b
Minor: Remove unused fileManager property
2017-12-01 22:53:17 +09:00