Denis Zharkov
afcdd27d67
Add some marginal tests for types enhancement
2015-07-09 16:36:45 +03:00
Denis Zharkov
5ea0c14d4a
Expand the AbstractJvmRuntimeDescriptorLoaderTest hack
...
Remove type related annotations from java source as they have CLASS retention policy
2015-07-09 16:36:45 +03:00
Denis Zharkov
00e41fc238
Fix testData after types enhancement
2015-07-09 16:36:45 +03:00
Denis Zharkov
befe025d21
Fix intentions testData: types rendering changed
...
Some more FQ names appeared.
The reason is that earlier such types were Lazy and their `toString` method return short version.
But after type enhancement they are represented with JetTypeImpl
2015-07-09 16:36:45 +03:00
Denis Zharkov
f0833d626a
Fix intentions tests after types enhancement
...
Types became more accurate
2015-07-09 16:36:44 +03:00
Denis Zharkov
cfadda8061
Fix codegen tests after types enhancement
2015-07-09 16:36:44 +03:00
Denis Zharkov
1b44f77054
Minor. trait -> interface in testData
2015-07-09 16:36:44 +03:00
Denis Zharkov
d4e5479f0f
Update testData for nullability warnings
...
They become errors after type enhancement
2015-07-09 16:36:44 +03:00
Andrey Breslav
4e17500e1c
Test data for LoadJava tests fixed
2015-07-09 16:36:43 +03:00
Denis Zharkov
0173cb1c17
Diagnostics test data fixed
2015-07-09 16:36:43 +03:00
Denis Zharkov
e13f34a8a0
Minor. Use getOrElse from stdlib
2015-07-09 16:36:43 +03:00
Denis Zharkov
fd43799c6e
Use original descriptor when working with errors in KotlinSignature
...
Otherwise enhanced version are treated differently
2015-07-09 16:36:43 +03:00
Denis Zharkov
a551f21e9f
Use original descriptor when trying to obtain source
...
Also refine `getOriginal` of `DeclarationDescriptorWithSource` for comfortable use
2015-07-09 16:36:42 +03:00
Denis Zharkov
0375e45936
Change reporting policy for NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS
...
If lower bound of flexible is nullable treat it like Kotlin nullable type
Anyway appropriate errors are reported outside JavaNullabilityWarningsChecker
2015-07-09 16:36:42 +03:00
Denis Zharkov
1469a0aa6f
Make computation of indexed JavaTypeQualifiers eager
2015-07-09 16:36:42 +03:00
Denis Zharkov
c01c59d562
Use doSubstitute when enhacing types of Java method
...
Before this commit old type parameters were inserted into new descriptor,
and that broke a simple contract: desc.child.getContainingDeclaration() == desc.
We use `doSubstitute` here because it does exactly what we need:
1. creates full copy of descriptor
2. copies method's type parameters (with new containing declaration) and properly substitute to them in value parameters, return type and etc.
But we had to customize `doSubstitute`: add some parameters like `newReturnType`
NOTE: Strange testData change.
(Mutable)List<in T!>! after substitution becomes MutableList<in T!>..List<*>?.
But it's not wrong because List<in T> behaves exactly as List<*>, and the same happens when substituing Java class scope:
public class A<E> {
<T> void foo(List<? super T> x) {}
}
Kotlin:
A.foo(), type of first value parameter --- (Mutable)List<in T!>
A<String>().foo(), type of first value parameter --- MutableList<in T!>..List<*>?
2015-07-09 16:36:42 +03:00
Denis Zharkov
f6c4ec1533
Move creation of enhanced ValueParameterDescriptor to JavaCallableMemberDescriptor
...
It's needed because new parameter owner is not created while enhacing types
(It was containing declaration of old value parameter that is wrong)
Also simplified SignatureParts' logic: `replaceType` is always an identity function
2015-07-09 16:32:25 +03:00
Denis Zharkov
4710168c5a
Minor. Specify visibility for some declarations in typeEnhacement
2015-07-09 16:32:25 +03:00
Denis Zharkov
c769748cb0
Move type enhacement parts to separate package in runtime
...
It's needed to enhace types when loading descriptors via reflection.
Also get rid of `enhanceSignatures` method in ExternalSignatureResolver as enhancement does not use external signature at all
2015-07-09 16:32:25 +03:00
Andrey Breslav
c6b91b0f81
Java type annotations supported in LazyJavaTypeResolver
2015-07-09 16:32:25 +03:00
Andrey Breslav
eaae88133c
Minor FilteredAnnotations moved out of Java-specific code
2015-07-09 16:32:25 +03:00
Andrey Breslav
31f4ff749c
Type annotations supported in Java elements
...
Reflection-related implementations are pending
2015-07-09 16:32:25 +03:00
Andrey Breslav
694af022c8
Type Enhancement for Java fields and constructors supported as well
2015-07-09 16:32:25 +03:00
Andrey Breslav
8c78739983
Proper enhancement for type parameters
2015-07-09 16:32:25 +03:00
Andrey Breslav
04aee291b9
Proper treatment of return types
2015-07-09 16:32:25 +03:00
Andrey Breslav
a8b5698145
Proper enhancement for SAM adapters
2015-07-09 16:32:25 +03:00
Andrey Breslav
9644eeb047
Propagating annotations into type arguments
2015-07-09 16:32:24 +03:00
Andrey Breslav
4248654f5f
Signature enhancement: most basic version implemented
2015-07-09 16:32:24 +03:00
Andrey Breslav
61da419c4a
Spec: account for problematic cases (some unsolved yet)
2015-07-09 16:32:24 +03:00
Andrey Breslav
f376b2ba70
Stub infrastructure for enhancing platform signatures
2015-07-09 16:32:24 +03:00
Andrey Breslav
991f0fcf2e
Type enhancement and qualifier extraction
2015-07-09 16:32:24 +03:00
Andrey Breslav
e095162c19
Minor. Dictionary
2015-07-09 16:32:24 +03:00
Andrey Breslav
d140e83386
Minor. Methods renamed to reflect tha fact that they handle more types than just collections
2015-07-09 16:32:24 +03:00
Andrey Breslav
579ca9c1f2
Minor. Typo
2015-07-09 16:32:24 +03:00
Andrey Breslav
2de3a3b59e
Minor. Rename addToScope -> addFakeOverride
2015-07-09 16:32:24 +03:00
Denis Zharkov
a6a099b0f5
Fix flexible type rendering
...
Do not append "!" if bounds have same nullability
2015-07-09 16:32:24 +03:00
Andrey Breslav
64866183f7
Spec for enhancing Java declarations with annotations
2015-07-09 16:32:24 +03:00
Andrey Breslav
4d6ab824c8
Adding Java descriptors to the test data for nullability warnings
2015-07-09 16:32:23 +03:00
Nikolay Krasko
7386ea0d0b
Avoid counting directory parent for file
2015-07-09 12:06:36 +03:00
Dmitry Jemerov
77c0a54a79
convert QuickFixRegistrar to Kotlin; on-demand registration of quickfixes (KT-8307)
...
#KT-8307 Fixed
2015-07-08 18:27:24 +02:00
Dmitry Jemerov
6734dcb82c
QuickFixRegistrar: J2K
2015-07-08 18:04:22 +02:00
Dmitry Jemerov
3a1fb7d883
QuickFixes: J2K
2015-07-08 18:04:21 +02:00
Valentin Kipyatkov
4dc7081dc4
Completion: fixed filtering shadowed declarations for generic functions
2015-07-08 16:28:54 +03:00
Valentin Kipyatkov
3f74cc6351
More consistent presentation for different completion items producing lambda's
2015-07-08 16:28:53 +03:00
Valentin Kipyatkov
1f79955275
Completion: more intuitive presentation of function items that insert lambda
2015-07-08 16:28:53 +03:00
Valentin Kipyatkov
88dd86d603
Fixes: use isExactFunctionOrExtensionFunctionType() to detect when lambda can be passed
2015-07-08 16:28:52 +03:00
Valentin Kipyatkov
6b78a53c3d
More tests
2015-07-08 16:28:52 +03:00
Valentin Kipyatkov
91c4bf7530
Renamed test data
2015-07-08 16:28:35 +03:00
Valentin Kipyatkov
75d668bc19
Adapted completion in lambda signatures to modern syntax
2015-07-08 16:28:35 +03:00
Valentin Kipyatkov
60ea98f870
Moved/renamed test data
2015-07-08 16:28:34 +03:00