Commit Graph

30607 Commits

Author SHA1 Message Date
Ilya Gorbunov ce4b161df4 Find single jar file with binaries in target folders without knowning its version in advance. 2016-03-29 13:49:57 +03:00
Ilya Gorbunov a75093650c Add JvmField and const tests for exposed fields visibility 2016-03-29 13:49:55 +03:00
Ilya Gorbunov 0d12d60e8a Infer lateinit-exposed field effective visibility from its setter visibility. 2016-03-29 13:49:53 +03:00
Ilya Gorbunov f2cb5edf1a Do not consider protected members in final class as public API 2016-03-29 13:49:51 +03:00
Ilya Gorbunov 4e250e4dd1 Refactor data structures 2016-03-29 13:49:49 +03:00
Ilya Gorbunov 10792de4c1 Treat inline-exposed internal API as effectively public.
Comment out unsupported cases.
2016-03-29 13:49:48 +03:00
Ilya Gorbunov 0aaf0ba60f Take into account field kotlin visibility 2016-03-29 13:49:46 +03:00
Ilya Gorbunov bd8c83bee2 Merge public static API of non-public base supertypes into public subtype 2016-03-29 13:49:44 +03:00
Ilya Gorbunov 472b386101 Tests for public API dump tool. 2016-03-29 13:49:43 +03:00
Ilya Gorbunov da032e371a Minor: refactoring 2016-03-29 13:49:41 +03:00
Ilya Gorbunov 88a038a0df Filter out nested classes in non-public outer classes. 2016-03-29 13:49:39 +03:00
Ilya Gorbunov a9fd1de263 Tool to dump binary API signatures from compiled JAR.
Incorporate declaration mappings output from the compiler to take into account kotlin visibilities.
2016-03-29 13:49:38 +03:00
Ilya Gorbunov 25abdf9fdb Tests for declaration mappings dumping from compiler 2016-03-29 13:49:36 +03:00
Ilya Gorbunov e7d75fccd6 Introduce compiler option to dump declaration mapping. 2016-03-29 13:49:34 +03:00
Ilya Gorbunov 4e49187549 Dump declaration mapping during codegen process. 2016-03-29 13:49:33 +03:00
Natalia Ukhorskaya 68907d05c3 J2K produces unresolved 'toArray' calls for java Collection#toArray(T[])
#KT-11600 Fixed
2016-03-29 11:26:18 +03:00
Alexander Udalov a8bebeb48d Load annotations of const properties from multifile classes
Rework backing field generation logic in PropertyCodegen to switch the
ClassBuilder instance for a multifile part to that of the corresponding facade
class. This became needed because multifile parts, and their metadata, are
generated _before_ the multifile facade class and otherwise we would never
record that there's a synthetic '$annotations' method for a const val and would
not write that to the protobuf message for the property.

See also bad83200

 #KT-10892 Fixed
2016-03-28 21:11:14 +03:00
Alexander Udalov 6924d883eb Support reflection calls to multifile class members
#KT-11447 Fixed
2016-03-28 21:11:14 +03:00
Mikhail Glukhikh 9fa101b3fe Changelog: 1.0.1-2 added 2016-03-28 20:22:36 +03:00
Mikhail Glukhikh a541aaafd8 Protected in final inspection: protected modifier is effectively private in final classes #KT-6674 Fixed 2016-03-28 19:03:16 +03:00
Mikhail Glukhikh 20bac6178c Array in data class inspection: warning on array properties in data classes #KT-10299 Fixed 2016-03-28 19:00:16 +03:00
Yan Zhulanow 047828bd6d Fix EA-79598: getNode() in JspxImportListImpl returns null 2016-03-28 14:43:07 +03:00
Alexander Udalov a6610d1b0c Drop obsolete JVM intrinsics, rename JavaClassArray -> ArrayOf 2016-03-28 14:24:23 +03:00
Alexander Udalov d62535c388 Minor, drop unnecessary workaround of obsolete issue 2016-03-28 14:14:56 +03:00
Alexander Udalov a8e6a9c828 Minor, add JDK to multi-module Java analysis test 2016-03-28 14:14:55 +03:00
Alexander Udalov 2dab56db8e Do not report "incomplete hierarchy" in decompiler
It's fine if the decompiler can't find some classes; it won't do anything
except render their FQ names which are fully available
2016-03-28 14:13:59 +03:00
Alexander Udalov 8d64ed7f3f Do not produce error classes for not found annotations 2016-03-28 14:13:59 +03:00
Alexander Udalov e915e1548c Fix multiple 'unresolved java classifier' errors
Use the same component (NotFoundClasses) as in loading of compiled Kotlin
symbols.

Some tests were changed to avoid a diagnostic that is now reported when a
non-found class is encountered in a signature (e.g. staticMethod.1.java where
JDK seems to be not configured)

 #KT-10493 Fixed
 #KT-10820 Fixed
 #KT-11368 Fixed
2016-03-28 14:13:59 +03:00
Alexander Udalov 873cf439de Drop MissingDependencyErrorClass and related code
No longer needed because of the proper support for missing classes in
deserialization (see NotFoundClasses.kt)
2016-03-28 14:13:59 +03:00
Alexander Udalov db5e00bcc0 Report error if some deserialized classes are missing in dependencies
Technically we often can compile code which uses missing classes (as long as
nothing is called on them) but it seems better to let the user know something's
wrong in their setup before the error manifests itself at runtime. Also the
Java compiler does the same

 #KT-4328 Fixed
2016-03-28 14:13:59 +03:00
Alexander Udalov accf80a624 Do not create error types in deserialization on not found classes
For a class which cannot be resolved in the current deserialization session,
create a special ClassDescriptor instance with an empty scope and put in the
correct package under the current module. Codegen will perfectly map such class
to its JVM signature (because only the precise FQ name is needed, which is
available). For more details on this approach, see the issue description.

 #KT-4328 Fixed
 #KT-11497 Fixed
2016-03-28 14:13:59 +03:00
Alexander Udalov 3944d56ac2 Minor, remove unnecessary type parameter in CallChecker#check 2016-03-28 14:13:59 +03:00
Alexander Udalov 2c81824689 Rework and prettify CompileKotlinAgainstCustomBinariesTest
Do not use MockLibraryUtil to compile Kotlin code: this allows to avoid
rebuilding kotlin-compiler.jar every time before running a test. Also extract a
few utilities, use Kotlin stdlib where possible
2016-03-28 14:13:59 +03:00
Zalim Bashorov 9f069843e8 Minor: precise incremental compilation no longer experimental 2016-03-28 12:57:04 +03:00
Ilya Gorbunov 3779fb2521 Minor: Do not recompile markdown every time. 2016-03-26 01:02:53 +03:00
Natalia Ukhorskaya 470027bfd8 J2K: specify type for variables with anonymous type if they have write accesses 2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya 23908fb8f3 J2K produces unresolved 'toArray' calls for java Collection#toArray()
#KT-11600 Fixed
2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya 79bac598bf J2K breaks code if applied to a java class with static field which is accessed from another java class
#KT-11587 Fixed
2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya c7ae9981cb J2K: Quote '$' symbols in converted strings
#KT-6800 Fixed
2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya 4bc4f0bce7 J2K: not initialized field of non-primitive type should have null initializer
#KT-11544 Fixed
2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya 8616c9588d J2K, minor: pass nullability as additional parameter for more flexibility 2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya 59930c32c4 Debugger, refactoring in tests: add ability to skip some variables in printFrame 2016-03-25 20:27:19 +03:00
Natalia Ukhorskaya a09814961f Debugger: more precise context expression in codeFragment
#KT-11380 Fixed
2016-03-25 20:27:19 +03:00
Yan Zhulanow 77b7b46542 Kapt: fix sequential build with kapt when Kotlin source file was modified 2016-03-25 19:32:18 +03:00
hansenji 100252b18b Handle elements in two different classes with the same name annotated with the same annotation. 2016-03-25 19:32:18 +03:00
hansenji b9dc92d7cf Removed Test for deprecated annotation 2016-03-25 19:32:18 +03:00
Valentin Kipyatkov e62c8a0860 Unescape single quote when converting to string template 2016-03-25 18:11:34 +03:00
Valentin Kipyatkov 7f2ccb5613 KT-11295 AssertionError in ConvertToStringTemplateIntention.fold
#KT-11295 Fixed
2016-03-25 18:11:34 +03:00
Valentin Kipyatkov c1499e7cb6 KT-11576 Unused symbol warning: add quickfix for annotated declarations
#KT-11576 Fixed
2016-03-25 18:11:34 +03:00
Valentin Kipyatkov 03d7c5764d Moved confusing utility from KtPsiUtil (but the code in KtLightClassForExplicitDeclaration is still incorrect!) 2016-03-25 18:11:34 +03:00