Mikhael Bogdanov
625bfd8adb
Restrict conditions for @JvmDefault super calls
...
Condition was too strict
if @JvmDefault implicitly hidden by class in inheritance.
Diagnostic is redundant cause there isn't breaking
change depending on interface method generation strategy and
delegating stub generation in inheriting class.
(cherry picked from commit 56d1184 )
2018-04-10 16:43:28 +02:00
Mikhael Bogdanov
d3017a8071
Minor. Avoid recursion
...
(cherry picked from commit e23c406 )
2018-04-10 16:43:26 +02:00
Mikhael Bogdanov
b45a5a8ca7
Restrict conditions for @JvmDefault super calls
...
Condition was too strict if we actually make super call
through super class. Diagnostic is redundant cause there isn't breaking
change depending on interface method generation strategy.
(cherry picked from commit 6d1af26 )
2018-04-10 16:43:23 +02:00
Mikhael Bogdanov
26c8f32390
Add warning on overriding java default by non @JvmDefault method
...
(cherry picked from commit d788b3b )
2018-04-10 14:36:37 +02:00
Mikhael Bogdanov
e3d5021799
Support default method super calls within @JvmDefault ones
...
(cherry picked from commit cb9c1ae )
2018-04-10 14:36:34 +02:00
Mikhael Bogdanov
e5d903bc20
Properly calculate this for super call
...
(cherry picked from commit 942dd8a )
2018-04-10 14:36:31 +02:00
Mikhael Bogdanov
db722b468f
Require 'jvmDefaultFlag' for default super calls
...
(cherry picked from commit 2c56f0b )
2018-04-03 19:47:08 +02:00
Mikhael Bogdanov
ba4858dde9
Inline utility method
...
(cherry picked from commit db59e91 )
2018-04-03 19:47:05 +02:00
Mikhael Bogdanov
8037619a51
Write 'RequireKotlin' annotation on @JvmDefault members
...
(cherry picked from commit 3f5fea0 )
2018-04-03 19:47:02 +02:00
Mikhael Bogdanov
522be915c5
Add custom diagnostic checker for @JvmDefault annotation
...
(cherry picked from commit 23e8adb )
2018-04-03 19:46:59 +02:00
Mikhael Bogdanov
6e903333a6
Remove @JvmDefault members from delegation
...
(cherry picked from commit f290b32 )
2018-04-03 19:46:40 +02:00
Mikhael Bogdanov
3bbffa38ab
Add @JvmDefault diagnostics
...
(cherry picked from commit 1d3e57a )
2018-04-03 19:46:23 +02:00
Mikhael Bogdanov
75b3a662f3
Remove unused parameters, compiler keys and obsolete code
...
(cherry picked from commit 63afd37 )
2018-04-03 19:46:19 +02:00
Denis Zharkov
c334f46825
Avoid retaining reference to ProtoBuf.Package in JvmPackagePartSource
...
Otherwise, 2e933a165a doesn't help
2018-03-15 18:59:44 +03:00
Alexander Udalov
3f3e05a9d2
Move essential metadata-related classes to 'metadata' and 'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov
88dea9aa70
Move NameResolver to module 'metadata' and J2K
...
Also move NameResolverImpl to 'metadata' and JvmNameResolver to
'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov
27ad4f7d5d
Move ProtoBuf classes to package org.jetbrains.kotlin.metadata
2018-03-14 12:25:10 +01:00
Alexander Udalov
7e1b1db7cc
Minor, don't use BitEncoding where it's not necessary
2018-03-14 12:25:05 +01:00
Alexey Sedunov
4609b2ae37
Navigation: Resolve typealiased SAM-references to type alias declaration
...
#KT-15302 Fixed
2018-03-06 15:15:42 +03:00
Pavel V. Talanov
27d7bb595f
CliLightClassGenerationSupport: correctly find facade files
...
This fixes a problem where JvmPackageName annotation could force file
facades to be in the package different to declared kotlin package
2018-03-06 12:07:12 +01:00
Yan Zhulanow
34d1611ed4
Add Pill support to compiler and IDE modules
2018-03-02 03:15:17 +03:00
Mikhail Zarechenskiy
f23b5103ec
Avoid non-null assertions for inline classes based on nullable types
...
Note that there are more places where assertions for inline classes should refined:
- lateinit vars
- values that come from Java
- type casts (interfaces to inline class type)
2018-02-20 14:41:48 +03:00
Dmitry Savvinov
0929673576
Refactor DataFlowValueFactory into proper component
2018-02-20 13:11:33 +03:00
Mikhael Bogdanov
31c63dea50
Add jvm target 10 tests on jdk 10
2018-02-16 14:22:04 +01:00
Mikhail Zarechenskiy
1ac4e9755a
Generate synthetic unbox method for each wrapper of inline class
2018-02-09 02:08:11 +03:00
Alexander Udalov
7123202670
Add getExtensionOrNull utility for protobuf messages
2018-02-08 17:08:33 +01:00
Alexander Udalov
890374a42a
Load module annotations for JVM and JS modules in compiler
...
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov
b4ac852392
Add packageProto/nameResolver to JvmPackagePartSource
...
May be useful for loading platform-specific protobuf extensions (such as
package_module_name on JVM) when analyzing deserialized top level
members
2018-02-08 17:07:22 +01:00
Alexander Udalov
6da3f37fc3
Write anonymousObjectOriginName for classes copied during inline
...
#KT-21320
2018-02-06 13:05:22 +01:00
Mikhail Glukhikh
81122ed236
Fix a pack of broken IDE action tests
...
Related to KT-20281.
For Java resolve we can use also resolve with 'null' platform,
which is possible situation in tests.
2018-02-06 15:02:38 +03:00
Mikhail Glukhikh
19beaf57a7
JVM facade: for Java resolve, always use JvmPlatform resolver
...
So #KT-20281 Fixed
2018-02-06 09:50:10 +03:00
Mikhail Zarechenskiy
928a342ace
Initial version of codegen for inline classes
2018-02-05 12:07:40 +03:00
Vyacheslav Gerasimov
89a07ded1c
Extract versions and remove unnecessary '.jar' extensions
2018-01-30 17:06:18 +03:00
Ilya Chernikov
4eb557724c
Convert compiler projects to the new intellij deps
2018-01-30 17:06:13 +03:00
Ilya Chernikov
a4f28cd94f
Make all dependencies to idea sdk intransitive
2018-01-30 17:06:11 +03:00
Alexander Udalov
46b8deedf7
Run classifier usage checkers on constructor calls
...
In some cases, REFERENCE_TARGET for annotation entries is the annotation
class descriptor, and in others -- the constructor of that class
2018-01-29 12:22:41 +01:00
Alexander Udalov
8cd7686535
Introduce DeclarationCheckerContext, remove SimpleDeclarationChecker
2018-01-29 12:22:40 +01:00
Alexander Udalov
4cb5483c13
Introduce CheckerContext and ClassifierUsageCheckerContext
...
To reduce the number of parameters in classifier usage checker
implementations, and to unify the API with call checkers
2018-01-29 12:20:36 +01:00
Mikhael Bogdanov
c4da370b0b
Allow to use @JvmStatic in interface companion object
2018-01-26 10:09:20 +01:00
Mikhael Bogdanov
2340756b88
Minor. Reformat
2018-01-26 10:09:20 +01:00
Denis Zharkov
31e73e90d6
Explicitly state that PluginDeclarationProviderFactory is source-only
...
Before this change `filesScope` was effectively empty in cases when
module info is a library, thus looking
into PackageIndexUtil.packageExists(name, indexedFilesScope, project)
was kind of redundant since it always returns false for empty scopes
The initial motivation was run by 1716720604
that made PackageIndexUtil::packageExists calls much more frequent
2018-01-25 14:41:28 +03:00
Denis Zharkov
4d378912bf
Minor. Reformat JVM/JS analyzer facades
2018-01-25 14:41:28 +03:00
Alexander Udalov
a46a2b9b1c
Support nested classes in annotation classes
...
#KT-16962 In Progress
2018-01-24 15:54:35 +01:00
Alexander Udalov
899002b681
Refactor JavaEnumValueAnnotationArgument and implementations
...
Only require implementations to be able to compute the enum class name
and the corresponding entry name. Only this should be necessary to
correctly resolve the argument; the resolvers will find the
corresponding class descriptor if necessary
2018-01-18 12:49:38 +01:00
Alexander Udalov
907f53e539
Refactor ConstantValue implementations
...
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).
Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Alexey Tsvetkov
fec2d08d22
Compile actual and expected declarations together
...
#KT-20840 fixed
2017-12-22 16:12:19 +03:00
Pavel V. Talanov
aec893180e
Minor, JvmAnalyzerFacade: drop logging
...
Prevent log spam
2017-12-20 17:19:09 +03:00
Nikolay Krasko
b133189309
Rename: MyFunctionDescriptor -> SamAdapterExtensionFunctionDescriptorImpl
2017-12-15 16:14:48 +03:00
Denis Zharkov
fa6285d32a
Fix NPE in JavaNullabilityChecker when checking equals-calls
...
This NPE was introduced in ce41b5745a
Prior to the latter change there was a synthetic PSI element for each
equals-related call, thus callOperationNode was not null here.
== are intentionally treated as safe calls, but for nullability checker
it's not relevant, it only should report warnings on real safe-calls
2017-12-14 19:15:41 +03:00
Denis Zharkov
e24e711208
Avoid rebuilds after changes of layouts xml-files
...
This commit makes IC react more granularly on these changes
Precisely, it marks dirty only kt-files that having lookups into
synthetic package built upon a changed layout-file
#KT-21622 Fixed
2017-12-12 16:17:58 +03:00