Denis Zharkov
86c1dbe7b5
Fix decompilation of types based on local classifiers
...
If deserializing a type with arguments based on a local class for
decompiler, then just return Any type (without arguments).
Previously Any constructor was used with serialized arguments, that lead
to exception
Note that in case of deserialization for compiler nothing changes about
local-classes-based types (LocalClassifierResolverImpl is just inlined)
#KT-13408 Fixed
2016-09-05 17:54:36 +03:00
Michael Bogdanov
7325baa06a
Fix for KT-13374: CompilationException: Inline function call with anonymous object implementing an interface by delegation
...
#KT-13374 Fixed
2016-08-16 10:47:01 +03:00
Alexander Udalov
18887f8bec
Rename CompanionObjectMapping.hasMappingToObject -> isMappedIntrinsicCompanionObject
2016-08-15 19:41:47 +03:00
Alexander Udalov
611899e9d3
Minor, make CompanionObjectMapping a singleton
2016-08-15 19:41:47 +03:00
Pavel V. Talanov
252b8ec6db
Add assertions to prohibit creating LazyJavaClassDescriptor by KtLightClass
...
Diagnosing KT-12966
2016-08-03 17:29:08 +03:00
Pavel V. Talanov
30892e0154
KtLightClassForDecompiledDeclaration is now marked by KtLightClassMarker
...
Rename: KtJavaMirrorMarker -> KtLightClassMarker
Introduce code to be able to tell light classes from source and binaries apart in 'frontend.java'
2016-08-03 17:29:06 +03:00
Denis Zharkov
915e36cb02
Add Map.getOrDefault method as PlatformDependent declaration with refined signature
...
- First parameter should have type of K instead of Any
- Special bridge should return second parameter if a key has wrong type
- Special bridge may throw an exception if defaultValue has wrong type
#KT-13209 Fixed
2016-07-27 18:46:13 +03:00
Denis Zharkov
169acf2f31
Refine method's contract and rename it
...
Basically what's it checked before is that
receiver is a valid override of raw version of builtinWithErasedParameters
While we need to check that method has the same JVM descriptor as builtinWithErasedParameters,
but it's not a valid override of latter
It's important for 'getOrDefault(Object k, V value)' ('getOrDefault(K k, V value)' in Kotlin):
'getOrDefault(Object k, V value)' is not override of 'getOrDefault(Object k, Object value)',
that leads to incorrect loading of former method (like it's not an override of declaration in Map)
2016-07-27 18:46:13 +03:00
Denis Zharkov
15b94bb8df
Minor. Move method closer to it's usage and simplify it
2016-07-27 18:46:13 +03:00
Alexander Udalov
720c29e8f4
Minor, fix NonExistentClass name and format
2016-07-07 13:56:01 +03:00
Denis Zharkov
7723a3a105
Refine definition of whether single parameter the method should be boxed
...
Only 'Collection<Int>.remove(E): Boolean' should match
2016-07-04 15:44:00 +03:00
Denis Zharkov
adff666b0e
Introduce additional overridability rule
...
It works only for Java methods and it's purpose is Java overridability rules emulation,
namely distinction of primitive types and their wrappers.
For example `void foo(Integer x)` should not be an override for `void foo(int x)`
#KT-11440 Fixed
#KT-11389 Fixed
2016-07-04 15:44:00 +03:00
Denis Zharkov
082c4f971e
Minor. Extract overridability rule into separate method
2016-07-04 15:44:00 +03:00
Denis Zharkov
167882df5d
Temporary return BuiltinOverridabilityCondition class
...
Otherwise bootstrap problems appear
2016-07-04 15:44:00 +03:00
Denis Zharkov
dc713cda2c
Rename: BuiltinOverridabilityCondition -> JavaIncompatibilityRulesOverridabilityConditionBuiltinOverridabilityCondition
2016-07-04 15:44:00 +03:00
Denis Zharkov
067fe35b72
Fix type deserialization failure when type alias was not found
...
It's crucial for decompilation as declarations are always being deserialized
with no dependencies
#KT-12832 Fixed
2016-06-28 10:33:29 +03:00
Alexander Udalov
4c8e8b099a
Update protobuf from 2.5.0 to 2.6.1
2016-06-27 20:14:00 +03:00
Mikhael Bogdanov
db5d9940df
Added 'isInline' implementation to property accessor descriptors
2016-06-24 17:05:48 +03:00
Yan Zhulanow
6752df189d
Make infix modifier diagnostic message more informative (KT-12589)
...
(cherry picked from commit 2744309)
2016-06-24 15:10:19 +03:00
Pavel V. Talanov
bafe8e55ce
Create SyntheticMemberDescriptor interface
...
Implement this interface by sam adapters/constructors and use it in navigation
#KT-11708 Fixed
2016-06-20 20:15:34 +03:00
Alexander Udalov
02fd5371aa
Update metadata version to 1.1.2 and bytecode version to 1.0.1
...
This is needed for the upcoming 1.1 EAP: it'll be easier to diagnose problems
arising from new language features and bytecode modifications
2016-06-16 16:51:18 +03:00
Alexander Udalov
7e38b93d80
Use protobuf with renamed packages, pack to IDEA plugin
...
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources
#KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Denis Zharkov
036f90053e
Minor. Fix formatting
2016-06-09 17:57:15 +03:00
Denis Zharkov
92bd6880da
Add AdditionalBuiltInsMembers language feature and relevant checks
2016-06-09 17:57:15 +03:00
Stanislav Erokhin
de97bc2a05
Minor. simplified creation of simple type with default scope.
2016-06-09 12:58:16 +03:00
Stanislav Erokhin
0bec639b07
Introduce LazyWrappedType.
2016-06-09 12:58:14 +03:00
Stanislav Erokhin
7a5469faa4
Minor. rename LazyJavaTypeResolver -> JavaTypeResolver.
2016-06-09 12:58:12 +03:00
Stanislav Erokhin
c30754ae3c
Remove laziness from LazyJavaTypeResolver.
...
This laziness was removed because main client of JavaTypeResolver is LazyJavaMemberScope. And this scope run enhance signatures which run resolve for this types.
2016-06-09 12:58:10 +03:00
Stanislav Erokhin
e5aa8ebe7c
Minor. simplify code.
2016-06-09 12:58:09 +03:00
Stanislav Erokhin
8c2ad82de7
Minor. fixes after review
2016-06-09 12:58:07 +03:00
Stanislav Erokhin
dd362f683c
Corrected util method getFunctionTypeForSamType for flexible types.
2016-06-09 12:58:03 +03:00
Stanislav Erokhin
a6da15f8e2
Minor. remove several methods from TypeUtils
2016-06-09 12:58:02 +03:00
Stanislav Erokhin
f41c8dc045
Refactoring. Removed several usages of asSimpleType
2016-06-09 12:58:00 +03:00
Stanislav Erokhin
1d9ca06b96
Remake KotlinTypes.
2016-06-09 12:57:59 +03:00
Stanislav Erokhin
4c0572fb2f
Remove type capability CustomTypeVariable.
2016-06-09 12:57:56 +03:00
Stanislav Erokhin
203c4cd94d
Remake Raw type representation.
...
(cherry picked from commit b21cede)
2016-06-09 12:57:53 +03:00
Stanislav Erokhin
1eaefa7fed
Refactoring. Remove type capability Flexibility.
2016-06-09 12:57:50 +03:00
Stanislav Erokhin
669558c4ba
Refactoring. Move flexible type factory to deserialization module.
2016-06-09 12:57:48 +03:00
Stanislav Erokhin
7bc2c55d12
Refactoring. Create WrappedType.
2016-06-09 12:57:46 +03:00
Stanislav Erokhin
957bae18be
Refactoring. Move flexible type creation to KotlinTypeFactory.
2016-06-09 12:57:44 +03:00
Stanislav Erokhin
3a451744c5
Introduce KotlinTypeFactory
2016-06-09 12:57:43 +03:00
Denis Zharkov
7dda2d9f62
Add ability to set up source element when copying descriptor
2016-06-08 18:53:16 +03:00
Denis Zharkov
329fb9d619
Introduce 'coroutine'/'suspend' modifiers
2016-06-08 18:53:16 +03:00
Mikhail Glukhikh
31cdc917d7
Source code cleanup: leaking this quick fixes applied
2016-06-03 14:46:11 +03:00
Dmitry Petrov
32f61c3918
KT-11588 Type aliases
...
Deserialization
2016-05-20 14:17:25 +03:00
Mikhail Glukhikh
ebd57fafd7
Cleanup: val can be parameter
2016-05-20 13:38:42 +03:00
Stanislav Erokhin
74bddcfb70
Refactoring. Convert Annotated to kotlin.
2016-05-20 09:32:55 +03:00
Stanislav Erokhin
450ea78b1d
Refactoring. Convert KotlinType to kotlin.
2016-05-20 09:32:54 +03:00
Stanislav Erokhin
8c2d68fff0
Refactoring. Move specificity relations into TypeSpecificityComparator component.
2016-05-20 09:32:53 +03:00
Denis Zharkov
46ac26147b
Annotate with @UnsafeVariance relevant types in built-ins
2016-05-18 19:21:38 +03:00