Commit Graph

37220 Commits

Author SHA1 Message Date
Alexey Sedunov ba73269ee0 Kotlin Facet: Do not show implicit compiler arguments in "Additional arguments" field 2017-02-09 11:41:05 +03:00
Alexey Sedunov 52102d359a Kotlin Gradle Plugin: Expose default compiler arguments via compilation task API 2017-02-09 11:41:04 +03:00
Ilya Gorbunov ec01200997 Introduce ItemArrayLike interface and replace multiple asList adapters with the single one. 2017-02-08 23:31:58 +03:00
Ilya Gorbunov 41c980bcab Massive deprecations in kotlin.dom 2017-02-08 23:31:58 +03:00
Ilya Gorbunov 365f8d0256 Drop pre-1.0 deprecated dom helpers. 2017-02-08 23:31:58 +03:00
Simon Ogorodnik a9f2f5c7d0 Fix for complete slowdown of DefaultImportProvider after introducing languageVersion for default imports
KT-16243 Very slow completion after variable of type `ArrayList`
 #KT-16243 fixed
2017-02-08 21:30:32 +03:00
Ilya Gorbunov e9f40c41c2 Minor: refactor and rename parameters. 2017-02-08 20:16:10 +03:00
Ilya Gorbunov 31da36bedf Minor: Add test cases for adding and removing null value to/from set.
Fix unused value in removeAll test.
2017-02-08 20:13:22 +03:00
Ilya Gorbunov c37540c727 Minor: fix missing angle bracket. 2017-02-08 20:13:22 +03:00
Ilya Gorbunov 287a513f23 Provide KDoc for js collection implementations. 2017-02-08 20:13:22 +03:00
Ilya Gorbunov 2269b9839f Restrict visibility of AbstractMap.SimpleEntry in JS 2017-02-08 20:13:22 +03:00
Ilya Gorbunov fc7b1c8611 KDoc for mutable abstract collections.
Document abstract overrides.
2017-02-08 20:13:22 +03:00
Ilya Gorbunov ef5e53b37b KDoc for read-only abstract collections 2017-02-08 20:13:22 +03:00
Ilya Gorbunov 7c54c48e00 Add a note about generic parameter variance to Iterable, Collection, List, Set, Map and their mutable counterparts.
Minor: correct docs, code formatting.
2017-02-08 20:13:22 +03:00
Alexander Udalov ccbfa2e81d Fix Member.getKPackage and temporarily revert functionFromStdlib.kt 2017-02-08 20:02:49 +03:00
Alexander Udalov 6d16ea0a3a Fix reflection on top level declarations from other modules
The main problem here is that moduleName that is being passed to KPackageImpl
is useless: as can be seen in
ClosureCodegen.generateCallableReferenceDeclarationContainer, the name of the
current module is always written to the class file for a callable reference,
not the name of the module of the referenced declaration. This resulted in
reflection not loading the correct .kotlin_module file and subsequently not
finding the required file facade for a top-level function.

The commit does not fix the issue with the incorrect module name written in the
back-end, but workarounds it. It turns out, reflection can figure out the name
of the module of the referenced declaration itself by parsing the header from
the given java.lang.Class object for a single-file/multi-file package facade
and extract the package_module_name protobuf extension. Similar code was
already there in Member.getKPackage() in ReflectJvmMapping.kt but it did not
support multi-file classes, of which there are a lot in the standard library;
this is now supported

 #KT-12630 Fixed
 #KT-14731 Fixed
2017-02-08 19:23:18 +03:00
Alexander Udalov 8a79482c5c Minor, rename packageFacadeProvider -> packagePartProvider 2017-02-08 19:23:18 +03:00
Yan Zhulanow 131570080d Kapt3: Generate import statements in stubs 2017-02-08 19:01:17 +03:00
Yan Zhulanow 69a063b0b2 Kapt3: Serialize annotation processor options to base64 to support spaces in option values 2017-02-08 19:01:16 +03:00
Yan Zhulanow 8479618632 Kapt3: Invoke integration tests with the Kotlin runtime in the compile classpath (this fixes integration tests, nullability annotations from org.jetbrains were not found) 2017-02-08 19:01:15 +03:00
Yan Zhulanow 823781ea6c Kapt3: "$annotations" are not always ACC_PRIVATE now (see also KT-15993) 2017-02-08 19:01:14 +03:00
Yan Zhulanow 2553513205 Kapt3: Allow users to disable error type correction (and now it's disabled by default) 2017-02-08 19:01:13 +03:00
Yan Zhulanow 297f8d4161 Kapt3: Use the javac's finalCompiler log to determine if there were any annotation processing errors (KT-16176) 2017-02-08 19:01:13 +03:00
Yan Zhulanow 62092f31cc Minor: Update test data because of KT-15697 2017-02-08 19:01:12 +03:00
Yan Zhulanow de3cb4567f Minor: Remove obsolete JAVA_FILE_PARSING_ERROR constant, fix corresponding test 2017-02-08 19:01:11 +03:00
Yan Zhulanow 08b98f7133 Kapt3: Ignore declarations with illegal Java identifiers (KT-16153) 2017-02-08 19:01:10 +03:00
Yan Zhulanow 7296d9cb7c Kapt3: Fix working in verbose mode (NPE in JavacFiler.java:597) (KT-16146) 2017-02-08 19:01:09 +03:00
Yan Zhulanow 43a377d3e1 Kapt: Fix error messages map name 2017-02-08 19:01:08 +03:00
Yan Zhulanow 1819194a4c Kapt3: Allow annotations with Kotlin-only targets, such as PROPERTY (KT-15697) 2017-02-08 19:01:07 +03:00
Yan Zhulanow 6ded5939eb Kapt: Fix javac error reporting in Kotlin daemon, also fix parsing error reporting (KT-15524) 2017-02-08 19:01:06 +03:00
Yan Zhulanow cde7cb1076 Kapt3: Write Intellij annotations (NotNull/Nullable) to stubs 2017-02-08 19:01:05 +03:00
Yan Zhulanow 5a46c01f76 Kapt3: Add generated source files to Java compile task after kapt execution. Filter only .java files.
This is needed to generate Kotlin files using kapt.
2017-02-08 19:01:04 +03:00
Yan Zhulanow 1797ea62f4 NoArg: Support @Embeddable JPA annotation (KT-15946) 2017-02-08 19:01:03 +03:00
Yan Zhulanow 349095cd14 Maven: Make compiler plugin option reporting more user-friendly 2017-02-08 19:01:03 +03:00
Yan Zhulanow 277490b903 AllOpen, NoArg: Use presets in Maven plugins 2017-02-08 17:36:19 +03:00
Yan Zhulanow 52ecd05301 AllOpen, NoArg: Use presets in Gradle plugins 2017-02-08 17:36:19 +03:00
Yan Zhulanow feb5397f6f AllOpen, NoArg: Refactoring, support presets in order to hold special annotations for Spring and JPA in one place 2017-02-08 17:36:19 +03:00
Denis Zharkov f4690ebff9 Initialize JvmBuiltins for module configuration used in test
This method is only used within tests, and they didn't fail
mostly by coincidence.

But because of more eager reading of
JvmBuiltIns.isAdditionalBuiltInsFeatureSupported (that checks if built-ins
have been initialized) these tests started failing
2017-02-08 16:04:19 +03:00
Denis Zharkov 1bb40afada Simplify compatibility mode with ll=1.0 on JDK dependent built-ins
A lot of problem arise with current solution
(loading them with lowpriority annotation + additional call checkers):
- We errorneously treated ArrayList.stream as an existing method, while
  it's just a fake override from List
- The same problem arises when creating a class delegating to List.
  Also the latter case is failing with codegen internal error
  (see issue KT-16171)

The negative side of this solution is that instead of reporting meaningful
diagnostic, there will be UNRESOLVED_REFERENCE.
But it seems to be better than having strange problems like ones described above.

 #KT-16073 Fixed
 #KT-16171 Fixed
2017-02-08 16:04:19 +03:00
Mikhail Zarechenskiy d84c303029 Do not report 'const' inapplicability on property of error type
#KT-12477 Fixed
2017-02-08 15:42:48 +03:00
Mikhail Zarechenskiy e7ea076093 Do not apply constant folding for non built-in functions
#KT-15872 Fixed
2017-02-08 15:42:39 +03:00
Mikhail Zarechenskiy 935f7b1cc1 Add warning if constant conforms to infinity or zero
#KT-3805 Fixed
2017-02-08 15:42:33 +03:00
Sergey Igushkin 292f010e59 Fixed Kotlin2JsCompile not picking dependencies from configurations other than compile.
Example:

	apply plugin: 'kotlin2js'

    dependencies {
    	...
    	testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
    }

Here, the `:compileTestKotlin2Js` task did not pick the dependency and used the `compile` classpath.
This has been fixed.

Also, fixed `testCompileTestCouldAccessProduction` and added `testJsCustomSourceSet`.
2017-02-08 14:36:18 +03:00
Mikhail Glukhikh 607e205ad4 Resolve to descriptor: call safe version in background (~ isApplicable) #KT-12261 Fixed
Also #KT-11010 Fixed
Also #KT-12881 Fixed
Also #KT-16162 Fixed
2017-02-08 13:55:34 +03:00
Dmitry Jemerov 00003684e8 Add test for converting a string literal to UAST 2017-02-08 11:29:53 +01:00
Dmitry Jemerov 5dc178460e Update UAST to 1.0.10; move uast-kotlin tests to Kotlin project 2017-02-08 11:29:53 +01:00
Alexander Udalov cfe159181d Deprecate kotlin.reflect.findAnnotation with ERROR 2017-02-08 13:05:27 +03:00
Alexander Udalov 5987e8a47c Annotate findAnnotation and IllegalPropertyDelegateAccessException with SinceKotlin(1.1) 2017-02-08 13:05:27 +03:00
Alexander Udalov 845d6526b0 Annotate new API in runtime.jvm with SinceKotlin(1.1) 2017-02-08 13:05:27 +03:00
Dmitry N. Petrov 5e10a9d506 Merge pull request #1027 from JetBrains/rr/matveev
Override acceptChildren method in IrSetterCallImpl
2017-02-08 12:38:29 +03:00