Commit Graph

25974 Commits

Author SHA1 Message Date
Michael Nedzelsky ef8e7ea0bb Revert "add strict check for internal visibility during compilation"
This reverts commit d1ee58186f.
2015-09-23 17:45:42 +03:00
Michael Nedzelsky 01ece0faa4 Revert "fix tests (internal -> public)"
This reverts commit e86bf03e76.
2015-09-23 17:45:40 +03:00
Michael Nedzelsky db602df146 Revert "add test for check access to internal elements from another module"
This reverts commit 4d9eaf19c3.
2015-09-23 17:45:38 +03:00
Dmitry Petrov 8595315ba5 - Package facade classes should have ACC_DEPRECATED
- Light classes for package facades should be deprecated
2015-09-23 17:41:13 +03:00
Dmitry Petrov 3cd1c222f0 Generate delegates to multifile class members in package facade classes
(unless using -Xmultifile-package-facades option)
2015-09-23 17:41:13 +03:00
Dmitry Petrov 5cdbdfc2cc - Annotate package facades with java.lang.Deprecated.
- Provide KotlinDelegatedMethod annotation on package facade members.
2015-09-23 17:41:12 +03:00
Mikhail Glukhikh c4fb6d48c5 Object literals are now classes and expressions simultaneously for the purposes of annotation target checking 2015-09-23 16:47:07 +03:00
Mikhail Glukhikh dd4601fd08 Function literal is now expression and function simultaneously for purposes of annotation target checking 2015-09-23 16:47:04 +03:00
Mikhail Glukhikh 997e9a7dd7 Multi declaration is now a separate target in KotlinTarget 2015-09-23 16:46:44 +03:00
Mikhail Glukhikh 789f351f6f data modifier is now inapplicable to enum classes, annotations, objects and interfaces #KT-8302 Fixed 2015-09-23 16:33:11 +03:00
Mikhail Glukhikh 315a304c8e New modifier checking strategy: only one error but any number of warnings, a warning can never shadow an error 2015-09-23 16:33:08 +03:00
Mikhail Glukhikh 55c7df8b8d Deprecations: data class should now have at least one primary constructor parameter, parameters should be val / var and not vararg. 2015-09-23 16:33:05 +03:00
Mikhail Glukhikh 3d6253c27f abstract + data and sealed + data are also deprecated 2015-09-23 16:33:02 +03:00
Mikhail Glukhikh 038d955c23 Data classes cannot have class supertypes, a new test, relevant test fixes 2015-09-23 16:33:00 +03:00
Mikhail Glukhikh 58110cd0d1 open + data and inner + data are deprecated, a new test, relevant test fixes 2015-09-23 16:32:57 +03:00
Mikhail Glukhikh 731fdecf06 private / protected / internal modifiers are deprecated in interfaces, relevant tests changed 2015-09-23 16:32:54 +03:00
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