Denis Zharkov
d4e5479f0f
Update testData for nullability warnings
...
They become errors after type enhancement
2015-07-09 16:36:44 +03:00
Denis Zharkov
0173cb1c17
Diagnostics test data fixed
2015-07-09 16:36:43 +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
4d6ab824c8
Adding Java descriptors to the test data for nullability warnings
2015-07-09 16:32:23 +03:00
Alexander Udalov
feb4dd7b8f
Drop 'OBJECT$' field deprecated in M11
2015-07-06 16:19:54 +03:00
Ilya Gorbunov
39b27751df
Drop deprecated char operations: correct test data.
2015-07-04 04:46:23 +03:00
Nikolay Krasko
ff9c251438
Filter out overridden candidates before looking for most specific
...
This filtering will remove signature duplicates that prevent findMaximallySpecific() from finding best candidate.
2015-07-03 20:59:48 +03:00
Mikhail Glukhikh
bae9a7d7f8
Types are no more rendered for annotation arguments + a swarm of tests corrected accordingly
2015-07-01 16:12:32 +03:00
Mikhail Glukhikh
848c2afdb4
"is" over enum entry is now an error + new tests + test fixes
2015-06-30 19:46:30 +03:00
Mikhail Glukhikh
e1d3b296e9
Exhaustive when over enum may now use "is" instead of comparison + a pair of tests
2015-06-30 19:46:28 +03:00
Alexey Sedunov
5ac1fbf59b
Descriptor Renderer: Add parentheses around receiver type if it's non-nullable function type
...
#KT-8188 Fixed
2015-06-27 13:58:00 +03:00
Mikhail Glukhikh
4d2ba3e890
Sealed constructors are made private in front-end, tests changed accordingly
2015-06-25 19:07:20 +03:00
Mikhail Glukhikh
f6872dfbea
Exhaustive when support for sealed classes #KT-7606 Fixed
...
When on sealed can use is (both for derived classes and objects) or just comparison (only for derived objects).
A pack of tests provided.
2015-06-25 19:07:16 +03:00
Mikhail Glukhikh
8d25c20169
Introduction of sealed classes
...
Sealed classes can be derived only by their own inner classes or objects.
Their constructors cannot be called explicitly, so compiler knows all their descendants.
Incompatible modifier checks (final, abstract). Impossible with interface, object, enum.
A pack of tests provided.
2015-06-25 19:07:13 +03:00
Nikolay Krasko
a98468e829
Test for KT-5326
...
#KT-5326 Obsolete
2015-06-25 13:50:14 +03:00
Alexander Udalov
0593b833b5
Check extension receiver properly for property references
...
Without this, the unrelated type specified on the LHS of a property reference
literal was considered to be an extension receiver of the candidate, and the
resolution was erroneously successul. This is only reproducible for properties,
because if we're trying to resolve an extension, we consider all properties
from the scope, even non-extensions, because there may be a property of an
extension-functional type (T.() -> R). (We don't do this for functions.)
#KT-7430 Fixed
#KT-7945 Fixed
2015-06-23 23:35:17 +03:00
Denis Zharkov
602a1c11ac
Fix testData: parameter names are dropped from annotations
2015-06-23 16:44:47 +03:00
Pavel V. Talanov
997a6f1381
Fix import resolution for some cases of malformed imports ("import some.")
...
Fix parsing import directives in case of non-identifier after "import"
Add diagnostics test for malformed imports
2015-06-23 15:19:14 +03:00
Mikhail Glukhikh
065db07e1c
More accurate check on an enum entry deprecated super constructor #EA-69735 Fixed
2015-06-19 13:50:49 +03:00
dnpetrov
046189087a
KT-5963 Call to super shouldn't require type specification if there is no conflict
...
Implemented unqualified 'super' type resolution (in BasicExpressionTypingVisitor).
No overload resolution of any kind is involved.
Corresponding supertype is determined by the expected member name only:
- 'super.foo(...)' - function or property (of possibly callable type) 'foo'
- 'super.x' - property 'x'
Supertype should provide a non-abstract implementation of such member.
As a fall-back solution for diagnostics purposes, consider supertypes with abstract implementation of such member.
Diagnostics:
- AMBIGUOUS_SUPER on 'super', if multiple possible supertypes are available;
- ABSTRACT_SUPER_CALL on selector expression, if the only available implementation is abstract.
#KT-5963 Fixed
2015-06-18 14:16:34 +03:00
Alexander Udalov
1a3209e1dc
Drop traits with required classes
...
#KT-4771 Rejected
2015-06-17 16:23:58 +03:00
Alexander Udalov
4dcc373a5a
Fix concrete method inheritance in interfaces
...
For each non-abstract non-declared (i.e. inherited from supertypes) method in
an interface we generate its static form to the TImpl, which calls the TImpl
method from the corresponding supertype.
The accidental override tests changed because we're now trying to generate the
delegate for the super method, not knowing that it will clash with the declared
method
#KT-2888 Fixed
#KT-5393 Fixed
2015-06-17 16:23:56 +03:00
Mikhail Glukhikh
707307b19c
Fix for a cyclic generic upper bound for a class type parameter. A pair of tests.
2015-06-17 11:56:28 +03:00
Alexey Sedunov
f08c7d0fd8
Call Resolver: Fix nullability of parenthesized safe calls used as value arguments
...
#KT-7903 Fixed
2015-06-16 21:15:29 +03:00
Valentin Kipyatkov
c8f9b466b6
More correct comparison with CANT_INFER_FUNCTION_PARAM_TYPE
2015-06-15 18:32:44 +03:00
Alexander Udalov
3a6ba67602
Delete unused diagnostic about j.l.Class in annotations
2015-06-15 15:55:23 +03:00
Mikhail Glukhikh
e623aadf00
Exception fix: more accurate parsing of class base type #EA-65509 Fixed
2015-06-15 14:43:37 +03:00
Mikhail Glukhikh
d77c6eb30e
Exception fix: diagnose an error for a generic type which is a subtype of itself, a set of tests #EA-64453 Fixed
2015-06-15 14:43:24 +03:00
Denis Zharkov
da254ab1a0
Drop support of java.lang.Class as annotation parameter
...
Also drop some related diagnostics and testData
2015-06-12 09:55:12 +03:00
Denis Zharkov
26864a4407
Get rid of annotation syntax deprecation related things
2015-06-12 09:23:32 +03:00
Denis Zharkov
c9f79c2d05
Adjust testData: get rid of obsolete annotations
2015-06-12 09:23:31 +03:00
Alexey Sedunov
e1e1dd9413
Diagnostics: Fix range of DECLARATION_SIGNATURE diagnostics reported on secondary constructors
2015-06-11 13:53:00 +03:00
Alexey Sedunov
1ea2c24562
Light Classes: Primary constructor fixes
2015-06-11 13:52:48 +03:00
Mikhail Glukhikh
f9fe8cd341
Fixed annotation resolve for loop parameter or catched exceptions type
2015-06-10 18:38:27 +03:00
Mikhail Glukhikh
731e5d85a4
Annotation arguments resolve refactoring via ForceResolveUtil. Deptecated...Intention fixed accordingly
2015-06-10 18:38:25 +03:00
Mikhail Glukhikh
a792b29a78
Exception fix: more accurate type annotation parsing #EA-69124 Fixed
2015-06-09 14:36:12 +03:00
Pavel V. Talanov
7585cbfe22
Remove check in visibilities that allowed access to privates of outer packages
...
It doesn't work for a while now in imports and is planned to be dropped with upcoming changes to private
2015-06-08 20:25:52 +03:00
Alexander Udalov
6e97f85863
Fix type argument substitution bug in KFunction construction
...
For example,
KMemberFunction2<T, P1, P2, R> : KMemberFunction<T, R>
So for this inheritance the heuristic that was present ("take the last K type
parameters of the subclass, and substitute for K parameters of the superclass")
was wrong. The new heuristic for this case is: take type parameters with the
same names.
Also don't store "parameters" in a lazy value, since it's easy to compute and
it's computed practically every time anyway
2015-06-04 23:08:21 +03:00
Mikhail Glukhikh
98407a7c4b
Recursive annotations are now possible for properties / functions / classes / primary constructors #EA-66984 Fixed #EA-63992 Fixed #EA-64272 Fixed
...
A set of tests provided.
2015-06-04 20:09:36 +03:00
Denis Zharkov
8da3f53404
EA-53937: Drop failing assertion about no-name val in annotation
2015-06-04 16:11:02 +03:00
Pavel V. Talanov
ccaa779e2f
Minor: fix test
2015-06-02 19:06:27 +03:00
Alexander Udalov
158b3ba102
Make parameter names of fictitious function classes non-stable
...
To be able to change them when overriding invoke in subclasses without a
warning
2015-06-02 17:30:58 +03:00
Pavel V. Talanov
d2592e4a2c
Companion objects have public visibility by default
...
#KT-7114 Fixed
2015-06-02 16:23:03 +03:00
Valentin Kipyatkov
aefe0dd192
Changed highlighting range and attributes of useless elvis operator
2015-06-02 14:35:19 +03:00
Denis Zharkov
349d5f02ea
Drop wrong assertion about duplicating properties in data class
...
#EA-64269 Fixed
2015-06-02 14:07:49 +03:00
Denis Zharkov
70dbbd8fda
Resolve constructors declared in traits and objects
...
It prevents exceptions and produces less red code
#EA-68667 Fixed
2015-06-02 14:07:49 +03:00
Denis Zharkov
7f9d2e8a36
Refine diagnostics reported on primary constructors
2015-06-02 14:07:49 +03:00
Alexander Udalov
d2508c8710
Do not report irrelevant diagnostics on unresolved supertypes
...
Previously the confusing "trait with superclass" was reported when an
unresolved classifier appeared in interface supertypes
2015-06-02 12:30:14 +03:00
Mikhail Glukhikh
dea2ec9da6
When now tries to smart cast subject to not-null if contains no null case #KT-7857 Fixed
...
Some new tests + some fixed tests
2015-06-02 10:56:21 +03:00