Commit Graph

25958 Commits

Author SHA1 Message Date
Denis Zharkov dcb84a7d0a Make annotations-modifiers private and fix some lost usages
It's needed to prevent usages of them as real annotation/type.
But we can't remove them, because currently some modifiers
are artificially resolved as annotations of those classes.
2015-09-23 12:18:12 +03:00
Denis Zharkov 4a993f517e Drop tailRecursive and it's usage 2015-09-23 12:18:12 +03:00
Denis Zharkov 098f5462eb Drop inlineOptions and fix forgotten usages 2015-09-23 12:18:12 +03:00
Denis Zharkov 67486b867b Get rid of inlineOptions usages in IDE tests 2015-09-23 12:18:12 +03:00
Denis Zharkov e1e3a6c9ad Introduce const into decompiler and stub builder 2015-09-23 08:20:57 +03:00
Denis Zharkov c13f0812e3 Temporary workaround for strange JvmName behavior 2015-09-23 08:20:57 +03:00
Denis Zharkov d937a7cefc Generate field for const-val with same visibility as desciptor
Also add test checking that constant static final fields generated for them
2015-09-23 08:20:57 +03:00
Denis Zharkov ba6671edb4 Minor. Drop unused constant JetTokens.ANNOTATION_MODIFIERS_KEYWORDS 2015-09-23 08:20:57 +03:00
Denis Zharkov afd4e644a3 Report warning on usages of non-const vals in places where constants expected 2015-09-23 08:20:57 +03:00
Denis Zharkov 8d13f08271 Load static final fields of appropriate types from Java as const 2015-09-23 08:20:57 +03:00
Denis Zharkov 98dd08109d Serialize/Deserialize const modifier 2015-09-23 08:20:56 +03:00
Denis Zharkov b2b76d16d0 Add checks for const modifier applicability
1. Must be initialized in-place
2. Can not be open/abstract
3. Can not be an override
4. Can not be delegated
5. Initializer must be a compile-time constant
6. No getters
7. `const` is not applicable to vars or locals
8. `const val` should be whether top-level property or object member
2015-09-23 08:20:56 +03:00
Denis Zharkov bde58d6eb8 Introduce interface method: VariableDescriptor.isConst
And several default implementations
Also take it into account in renderer
2015-09-23 08:20:56 +03:00
Denis Zharkov 02b64ce1ed Parse const as soft modifier keyword 2015-09-23 08:20:56 +03:00
Denis Zharkov 4a3ac474ca Minor. Rename resolveValueArguments -> resolveAnnotationValueArguments 2015-09-23 08:20:56 +03:00
Denis Zharkov bafb6cc2f7 Minor. Extract common code in ModifierChecker 2015-09-23 08:20:56 +03:00
Michael Nedzelsky 4d9eaf19c3 add test for check access to internal elements from another module
#KT-9178 Fixed
2015-09-23 07:49:33 +03:00
Michael Nedzelsky e86bf03e76 fix tests (internal -> public) 2015-09-23 07:49:29 +03:00
Michael Nedzelsky d1ee58186f add strict check for internal visibility during compilation 2015-09-23 07:49:27 +03:00
Michael Nedzelsky ddaebd2b27 add isIncremental method to PackageFragmentDescriptorImpl in order to recognize descriptors from incremental package fragments during compilation 2015-09-23 07:49:23 +03:00
Michael Nedzelsky c342f6870a add isKotlinSourceElement method to Source interface in order to recognize kotlin source elements during compilation 2015-09-23 07:49:21 +03:00
Michael Nedzelsky bcd85aa30d changes some internal modifiers to public for elements which are used outside their modules 2015-09-23 07:49:17 +03:00
Valentin Kipyatkov 1afdb8d996 No nested classes auto-import 2015-09-23 01:42:19 +03:00
Valentin Kipyatkov 3d129522db Auto-import fix to use dependency rules (as in Java) 2015-09-23 01:42:19 +03:00
Valentin Kipyatkov 8f78b27462 Minor refactoring 2015-09-23 01:42:18 +03:00
Valentin Kipyatkov 232ab33c3a Minor 2015-09-23 01:42:18 +03:00
Valentin Kipyatkov 56b088233a KT-8179 Settings / "Add unambiguous imports on the fly" could work in Kotlin files too
#KT-8179 Fixed
2015-09-23 01:42:18 +03:00
Dmitry Kovanikov e26fe0b080 Disable completion in repl 2015-09-22 21:11:56 +03:00
Dmitry Kovanikov 87969f1660 Minor: change repl.ideMode property name to kotlin.repl.ideMode 2015-09-22 21:11:55 +03:00
Dmitry Kovanikov ab06dbfc70 Repl: add test to check multiline support 2015-09-22 21:11:54 +03:00
Dmitry Kovanikov bfe01cccea Repl: fix bug in handling multiline commands 2015-09-22 21:11:54 +03:00
Alexander Udalov 4ca8a51234 Move Interner from deserialization to util
This class is not used in core and should not end up in kotlin-reflect.jar
2015-09-22 18:22:59 +03:00
Alexander Udalov 1878f892c1 Minor, fix annoying nullability warning 2015-09-22 18:22:58 +03:00
Alexander Udalov e52a9b9fb8 Rename ClassDataProvider -> ClassDataWithSource 2015-09-22 18:22:58 +03:00
Alexander Udalov 0ef705f073 Minor, convert ClassData and PackageData to Kotlin data classes 2015-09-22 18:22:57 +03:00
Alexander Udalov 78e920f797 Minor, fix trove4j source paths 2015-09-22 18:22:57 +03:00
Alexander Udalov e7b041456f Add missing module to Kotlin JPS plugin
Since binary version stopped being a simple int and became an instance of the
class BinaryVersion, and since incremental cache loads versions of classes, the
JPS plugin now needs to have the 'deserialization' module which has that class
to avoid ClassNotFoundException.

This fixes CNFE from the bare plugin
2015-09-22 18:22:56 +03:00
Alexander Udalov f9ba7f6880 Minor, inline ClassData#read & PackageData#read to single usage 2015-09-22 18:22:56 +03:00
Alexander Udalov 4a8d2b73d3 Remove deprecated stuff unused after M13 2015-09-22 18:22:55 +03:00
Alexander Udalov 93b5065cf5 Get rid of SerializationUtil, move methods to DescriptorSerializer 2015-09-22 18:22:55 +03:00
Alexander Udalov 04b8991bdd Minor, move BuiltInsSerializerExtension to module builtins-serializer 2015-09-22 18:22:54 +03:00
Alexander Udalov 7cc416ed12 Minor, rename TRAIT -> INTERFACE, CLASS_OBJECT -> COMPANION_OBJECT 2015-09-22 18:22:54 +03:00
Alexander Udalov a0fb1a18e3 Minor, delete useless methods from NameResolver 2015-09-22 18:22:54 +03:00
Michael Nedzelsky 34d4d2e7d9 ProtoCompareGenerated: get rid ofusage of internal details of NameResolver 2015-09-22 18:22:53 +03:00
Dmitry Jemerov 9b33721a98 don't try to add auto-import if user closed the project while the popup was displayed (EA-67037 - assert: ComponentManagerImpl.getComponent) 2015-09-22 16:11:38 +02:00
Dmitry Jemerov 7ae5506d99 don't create reports for empty elements (EA-67307 - assert: ProblemDescriptorBase.<init>) 2015-09-22 16:11:37 +02:00
Dmitry Jemerov c669a06c97 return null instead of asserting on declarations with null name (EA-69471 - assert: JetSourceNavigationHelper.convertPropertyOrFunction) 2015-09-22 16:11:36 +02:00
Dmitry Jemerov 0febe3322b don't register template listener if we don't have an editor (EA-70683 - KNPE: OverrideImplementMethodsHandler.invoke) 2015-09-22 16:11:36 +02:00
Dmitry Jemerov e7a0f077f0 according to Peter, getting a PCE from indexes is a valid situation, don't log this as an error (EA-73265 - assert: KotlinCopyPasteReferenceProcessor.collectTransferableData) 2015-09-22 16:11:35 +02:00
Dmitry Jemerov 55b422ab9b remove 'public' modifier from default file templates 2015-09-22 16:07:48 +02:00