Alexander Udalov
828cc6dbf3
Add module-info.java for kotlin-reflect
...
The standard way of loading resources with built-ins metadata from the
current class loader no longer works in the modular mode on Java 9
because the current class loader is for module 'kotlin.reflect', but the
metadata is located in the module 'kotlin.stdlib'. On Java 9, we now use
the class loader of 'kotlin.stdlib' to load these resources.
#KT-21266 Fixed
2018-04-03 21:24:03 +02:00
Alexander Udalov
2d41c7d462
Add module-info.java for standard Kotlin libraries
...
Using the new multi-release jar feature, store compiled
module-info.class files into META-INF/versions/9 instead of the artifact
root. Hopefully, this will break fewer tools which do not support
module-info.class files because any sane tool should not do anything
with files in META-INF because before Java 9 that directory only
contained resources.
Upgrade some Maven plugins to newer versions which do not fail on
module-info.class files
#KT-21266 In Progress
2018-04-03 21:22:14 +02:00
Alexey Tsvetkov
650e97f200
Temporarily turn off source map generation in JS IC tests
...
Until IncrementalJsCompilerRunnerTestGenerated$ClassHierarchyAffected.testEnumEntryRemoved
is fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
6f59b6da8e
Use daemon if available for parsing files in JPS
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
3eb968807e
Invalidate usages of removed classes before round
...
#KT-23165 fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
8cd0f13f2b
Convert KotlinSourceFileCollector: simplify after conversion
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
3f36f472b3
Convert KotlinSourceFileCollector: actual conversion
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
336d63c0a3
Convert KotlinSourceFileCollector: rename file
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
bd779cb26e
Remove usages of deprecated API
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
58e4b704c6
Replace reflection with direct call
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
fa9c80e05c
Convert CompilerRunnerUtil: actual conversion
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
f27b6c0d8d
Convert CompilerRunnerUtil: rename file
2018-04-03 21:11:11 +03:00
Alexey Tsvetkov
455fe7fe61
Reformat jps-plugin module
2018-04-03 21:11:11 +03:00
Dmitry Jemerov
ecb9a39f94
Report errors when trying to build decompiled text for light class
2018-04-03 19:45:37 +02:00
Mikhael Bogdanov
08ff1de248
Update test data
2018-04-03 19:38:37 +02:00
Mikhael Bogdanov
2c56f0bfd3
Require 'jvmDefaultFlag' for default super calls
2018-04-03 19:18:19 +02:00
Mikhael Bogdanov
db59e916fb
Inline utility method
2018-04-03 19:18:18 +02:00
Mikhael Bogdanov
3f5fea05de
Write 'RequireKotlin' annotation on @JvmDefault members
2018-04-03 19:18:17 +02:00
Mikhael Bogdanov
23e8adb793
Add custom diagnostic checker for @JvmDefault annotation
2018-04-03 19:18:17 +02:00
Mikhael Bogdanov
89f22e69b4
Relocate @JvmDefault to stdlib module
2018-04-03 19:18:16 +02:00
Mikhael Bogdanov
38f8924ae3
Update test data. Use simple ''@JvmDefault' instead full qualifier
2018-04-03 19:18:15 +02:00
Mikhael Bogdanov
2a8041e77e
Check method abstractness during bridge generation per method not interface
2018-04-03 19:18:14 +02:00
Mikhael Bogdanov
f290b325ee
Remove @JvmDefault members from delegation
2018-04-03 19:18:14 +02:00
Mikhael Bogdanov
d84a15c0f6
Support inline for private @JvmDefault members
2018-04-03 19:18:13 +02:00
Mikhael Bogdanov
affe445955
Minor.Reformat
2018-04-03 19:18:12 +02:00
Mikhael Bogdanov
308283e52e
Support synthetic accessors for @JvmDefault members
2018-04-03 19:18:12 +02:00
Mikhael Bogdanov
1acd5642ce
Minor.Reformat
2018-04-03 19:18:11 +02:00
Mikhael Bogdanov
1d3e57acee
Add @JvmDefault diagnostics
2018-04-03 19:18:10 +02:00
Mikhael Bogdanov
63afd37cdd
Remove unused parameters, compiler keys and obsolete code
2018-04-03 19:18:10 +02:00
Mikhael Bogdanov
fe45eb2a81
Initial support of @JvmDefault
2018-04-03 19:18:09 +02:00
Mikhael Bogdanov
e885195ee1
Add @JvmDefault annotation
2018-04-03 19:18:08 +02:00
Mikhael Bogdanov
5830f99bce
Remove unused test data
2018-04-03 19:18:08 +02:00
Mikhael Bogdanov
c143480727
Remove wrong directive
...
Similar test exists under 'defaults' foldes
2018-04-03 19:18:07 +02:00
Mikhael Bogdanov
b337b9ea8d
Specify idea.home.path for java 8 tests
...
Default discovery mechanism points to wrong location
2018-04-03 19:18:06 +02:00
Ilmir Usmanov
eb81c205c7
Replace CHECKCAST kotlin/Unit with ARETURN for tail call optimization
...
Sometimes instead of {POP, GETSTATIC Unit.INSTANCE, ARETURN} sequence
the codegen emits {CHECKCAST Unit, ARETURN} sequence, which breaks tail
call optimization. By replacing CHECKCAST with ARETURN we eliminate
this issue.
#KT-19790: Fixed
2018-04-03 20:04:18 +03:00
Ilmir Usmanov
7b2de2de5e
Add regression test for KT-20744
...
#KT-20744: Obsolete
2018-04-03 20:02:02 +03:00
Toshiaki Kameyama
2d4ef8d1e6
Allow "add constructor invocation" for sealed top-level inheritors
...
So #KT-23320 Fixed
2018-04-03 19:49:32 +03:00
Mikhail Glukhikh
d54c57f9df
Minor refactoring: get rid of js.getJetTypeFqName usage in intention
2018-04-03 19:49:32 +03:00
Toshiaki Kameyama
488e5e9f60
Do not suggest "redundant toInt() call" for comparison receiver
...
So #KT-23133 Fixed
2018-04-03 19:49:31 +03:00
Toshiaki Kameyama
f91819ace7
"Simplify boolean expression": handle Boolean? comparison correctly
...
So #KT-23377 Fixed
2018-04-03 19:49:31 +03:00
Dmitry Jemerov
a495c2e5ea
Don't run analysis in SpecifyTypeExplicitlyIntention.isAvailable()
...
If type is invalid, show error hint when action is invoked
2018-04-03 18:37:33 +02:00
Mikhail Glukhikh
6d9457853e
Fix handling of characters in "convert to string template"
...
So #KT-23045 Fixed
So #KT-23046 Fixed
2018-04-03 18:26:25 +03:00
Alexander Udalov
d0e99e9a3f
Fix NPE from JarURLConnection.getUseCaches when loading compiler plugins
...
#KT-22513 Fixed
2018-04-03 16:55:48 +02:00
Mikhail Glukhikh
2125c42328
Make DeprecatedCallableAddReplaceWithInspection applicability based
...
Removes intention version of the same thing
Includes some optimization of 'Deprecated' annotation detection
2018-04-03 17:46:27 +03:00
Mikhail Glukhikh
ab973b2ff0
Fix several false positives and make safer "redundant companion ref"
...
Don't report it on an import directive #KT-23520 Fixed
Don't report it if companion nested class is referenced #KT-23519 Fixed
Check companion reference both by descriptor and by name
2018-04-03 17:45:14 +03:00
Mikhail Glukhikh
23488fac56
Optimization: RedundantCompanionReferenceInspection
2018-04-03 17:30:46 +03:00
Alexander Udalov
964bf503a6
Fix warning about kotlin-reflect-api bundling Kotlin Runtime
...
This fixes the "Some JAR files in the classpath have the Kotlin Runtime
library bundled into them" warning when compiling all modules that
depend on kotlin-reflect-api. This warning is reported on jars in the
classpath which look like standard library artifacts, but in fact are
not because their manifest does not say so. With this change, we're now
writing the manifest of standard library artifacts to the resulting jar
of kotlin-reflect-api, with the standard library component name
"internal" (in fact, it doesn't affect anything here, any name would be
OK) to make the compiler believe that this is actually a standard
library jar
2018-04-03 13:18:56 +02:00
Nicolay Mitropolsky
14ce13315c
Uast: wrapping expression bodies with return and code block (#KT-23557)
2018-04-03 14:10:01 +03:00
Mikhail Glukhikh
66d134ef5c
"Can be private" inspection: don't analyze data class parameters
...
So #KT-23566 Fixed
2018-04-03 13:44:37 +03:00
Yan Zhulanow
dc3cd01fad
Kapt: Find the right annotation descriptor in case of repeatable annotations (#KT-23427)
2018-04-03 00:16:54 +03:00