Commit Graph

46283 Commits

Author SHA1 Message Date
Nicolay Mitropolsky cbcc3d2e2e Test for java-keywords in light-annotations (KT-22883)
working with new source-based light annotations
2018-05-29 16:34:10 +03:00
Mikhael Bogdanov ad717d5335 Support properties in compatibility mode 2018-05-29 15:08:07 +02:00
Mikhael Bogdanov 0498c3b765 Don't copy descriptor for delegation generation
Actually source element for DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL
  was always null cause descriptor was copies with new kind=DECLARATION.
  That causes element recalculation in DiagnosticFactory:
  element = data.classOrigin.element
  So DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL is added to EXTERNAL_SOURCES_KINDS
2018-05-29 15:08:07 +02:00
Roman Artemev 9d2092e86d Fix visibility of @JsName-annotated symbols in stdlib-js 2018-05-29 13:57:34 +03:00
Roman Artemev 06009a532b Add test case to detect name clash in stdlib-js 2018-05-29 13:57:34 +03:00
Mikhael Bogdanov 689a492b9a Minor. Fix test data 2018-05-29 12:47:07 +02:00
Mikhael Bogdanov 23a713d46b Rollback 'Don't copy interface member on DefaultImpl delegation generation, keep kind' 2018-05-29 12:47:06 +02:00
Nicolay Mitropolsky 8e2c9358bc Uast: updates for consistency tests and fixes for missed things
we should use `sourcePsi` instead of `psi` for parents matching, because light `psi` will not be tested, and it is not enough to store only PSI as map key to match parent consistency, because some different UElements could have same sourcePsi.
2018-05-29 13:30:52 +03:00
Mikhael Bogdanov 0a26f527f2 Minor. Fix test data 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov 419218b9cf Rename 'jvm-default-mode' to 'jvm-default'. Add description 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov 020573ef3c Don't generate compatibility suffix twice for properties 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov 60f2dbeb8a Support property accessor in compatibility mode 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov 7f4bd549aa Minor. Fix rebase 2018-05-29 09:28:46 +02:00
Mikhael Bogdanov 1d6665d355 Minor. Remove hack 2018-05-28 22:15:54 +02:00
Mikhael Bogdanov b7bad2bd72 Pass accessorKind into AccessorForCallableDescriptor 2018-05-28 22:15:53 +02:00
Mikhael Bogdanov 7a649e0e74 Convert AccessorForPropertyDescriptor to Kotlin 2018-05-28 22:15:52 +02:00
Mikhael Bogdanov 6d321e7997 Rename AccessorForPropertyDescriptor.java to AccessorForPropertyDescriptor.kt 2018-05-28 22:15:51 +02:00
Mikhael Bogdanov df13d332b3 Minor. Code clean 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov 15cbb68d47 Convert AccessorForCallableDescriptor to Kotlin 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov 2fa521b62a Convert AccessorForFunctionDescriptor to Kotlin 2018-05-28 22:15:49 +02:00
Mikhael Bogdanov 25af7c14e3 Rename AccessorForFunctionDescriptor.java -> AccessorForFunctionDescriptor.kt 2018-05-28 22:15:48 +02:00
Mikhael Bogdanov 8f19dea4a2 Rename FieldAccessorKind to AccessorKind 2018-05-28 22:15:47 +02:00
Mikhael Bogdanov ad57ca7d2c Minor. Code clean 2018-05-28 22:15:46 +02:00
Mikhael Bogdanov 340920fe38 Support compatibility mode for @JvmDefault 2018-05-28 22:15:45 +02:00
Mikhael Bogdanov 9b718e83a9 Don't copy interface member on DefaultImpl delegation generation, keep kind
Old logic is redundant and obsolete
2018-05-28 22:15:44 +02:00
Mikhael Bogdanov 4421b41790 Skip annotation classes in $DefaultImpls method delegation logic
Annotation could be safely skipped (as already interfaces) cause
  compiler generates delegation to DefaultImpls only for classes
2018-05-28 22:15:43 +02:00
Mikhael Bogdanov 065780de4c Switch enableJvmDefault to jvmDefaultMode 2018-05-28 22:15:42 +02:00
Ilya Chernikov bacc2079ed Fix/workaround lazy lcript definition test and related scenarios 2018-05-28 22:10:56 +02:00
Ilya Chernikov 6fdb8746de Fixes after review 2018-05-28 22:10:56 +02:00
Ilya Chernikov 6218b2bcf6 Fix custom script codegen test: add missing classpath entries 2018-05-28 22:10:56 +02:00
Ilya Chernikov a46dd5b30e Avoid using reflected types in the scripting API
since it causes numerous classloading issues. Using the wrapping types
and reload them in the proper context when needed.
Note: this version supports only classes, but the wrapping type could
be extended to support other types in the future.
+ numerous fixes related to proper loading and handling of the templates.
2018-05-28 22:10:56 +02:00
Ilya Chernikov 4d65f0478b Move scripting codegen code from tests-common to compiler tests
getting rid of dependencies on scripting in the tests-common
2018-05-28 22:10:56 +02:00
Pavel V. Talanov c54967b1b4 IdeaModuleInfos: cache Module.findImplementedModules
Calling ModuleSourceInfo.expectedBy can be quite costly otherwise
    because creating IdeModifiableModuleProvider is not cheap
2018-05-28 20:02:02 +02:00
Pavel V. Talanov 607fab994c Cache result of collectModulesFromIdeaModel
Cache base module infos from idea model until next root modification
Calculate platform specific module infos (see PlatformModuleInfo)
    on demand based on cached module infos from idea model

 #KT-24144 Fixed
2018-05-28 20:02:02 +02:00
Pavel V. Talanov 406a3888c7 Minor: split getModuleInfo into separate files 2018-05-28 20:02:01 +02:00
Alexey Sedunov 4053278119 Misc: Do not set icon via GUI Designer
Since Designer references icon by filename it fails
due to recent update in IDEA icon files

 #KT-24580 Fixed
2018-05-28 17:36:09 +03:00
Nicolay Mitropolsky aed63d49ce WrongAnnotations.kt - disabled LAZINESS:Consistency -check
because source-based LightAnnotations produces annotation values from arguments in sources even when they are invalid as parameters. Thus they could be inconsistenct with "compiled" ones and it is not an error.
2018-05-28 17:06:35 +03:00
Nicolay Mitropolsky da5ef06abf KtLightNullabilityAnnotation evaluated from sources 2018-05-28 17:06:35 +03:00
Nicolay Mitropolsky eea66bea73 Making LightAnnotation work without clsDelegate (KT-20924, KT-22883) 2018-05-28 17:06:35 +03:00
Anton Bannykh 03e46ce0ca JS: more default arguments fixes (KT-24413, KT-21968 fixed)
MPP-related:
* inherited from interfaces
* inherited body from interface
* default arguments in an interface, implemented by a class delegate
* super call of a method with default argument

Also:
* inheritance from an interface and another interface descendant (KT-21968)
* inheritance through an intermediate interface
2018-05-28 15:27:21 +03:00
Dmitry Savvinov da7b59984f Move importsDumper to compiler plugin 2018-05-28 13:02:48 +03:00
Dmitry Savvinov 16ee2df585 Fix tests for imports dumper
Remove local absolute paths from testdata, introduce new testrunner to
support relativization of imports dump.
2018-05-28 13:02:47 +03:00
Nicolay Mitropolsky c97f4539d3 181: ideaCompatibleBuildNumber = "181.3" 2018-05-28 12:05:02 +03:00
Alexander Udalov 06d97cce51 Fix multiple issues when expanding argfiles
- treat a contiguous whitespace sequence as a single argument separator,
  not as several empty-string arguments separated by whitespaces
- fix infinite loop when reading unfinished quoted argument
- do not attempt to perform escape if the backslash is the last
  character in the file
2018-05-28 11:23:32 +03:00
Alexander Udalov 61902e1fd5 Support -Xargfile in all scenarios; refactor & prettify code
Perform command line argument preprocessing in the beginning of
parseCommandLineArguments, so that argfiles are expanded in all
scenarios, not just when the compiler is invoked via
K2{JVM,JS}Compiler.exec
2018-05-28 11:23:32 +03:00
Dmitry Savvinov 43467516ef Support argfiles in kotlin compiler
Using '-Xargfile=path/to/argfile' will substitute
that argument with the content of argfile.

See KT-24472
2018-05-28 11:23:32 +03:00
Neonailol ede2e227c2 KT-23356 Cross-platform function to convert CharArray slice to String
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-26 06:06:53 +03:00
Max Medvedev 16ebcc6e77 Extract function: make name editor focused
#KT-22333 Fixed
2018-05-25 23:30:09 +03:00
Alexey Sedunov 610cc3867b Create Class from Usage: Filter out usages in super type entry list
#KT-22918 Fixed
2018-05-25 23:03:26 +03:00
Alexey Sedunov 35517a8253 Quick Fixes: Fix adding parameter to Java constructor
#KT-24574 In Progress
2018-05-25 23:03:26 +03:00