Mikhail Glukhikh
025d063b27
UNNECESSARY_LATEINIT: do not report if property is not initialized at use-site #KT-13806 Fixed
...
(cherry picked from commit 09c0865)
2016-09-27 18:49:02 +03:00
Mikhail Glukhikh
4da9a101cf
UNNECESSARY_LATEINIT warning introduced #KT-13295 Fixed
...
(cherry picked from commit 88f9938)
2016-09-27 18:48:50 +03:00
Alexander Udalov
dca99c3fd2
Move ClassifierUsageChecker invocation lower in LazyTopDownAnalyzer
...
Invoking checkers right after resolution of qualified expressions is too early:
DeprecatedClassifierUsageChecker tries to load the annotations of a referenced
classifier to report deprecation, and that may result in building light classes
for not yet analyzed declarations
#KT-13954 Fixed
2016-09-24 11:26:56 +03:00
Denis Zharkov
5381c06936
Improve 1.0-compatibility mode for JDK dependent members
...
Just reporting error by call checker may be too restrictive
in case there are some extensions that can be used successfully
Solution is to annotate additional members with
@Deprecated(level=Error) + @kotlin.internal.LowPriorityInOverloadResolution
2016-09-22 15:40:37 +03:00
Mikhail Glukhikh
68f0953b02
Random-order variable sets are no more in use in CFG #KT-13990 Fixed
...
(cherry picked from commit fc89385)
2016-09-22 13:32:01 +03:00
Dmitry Petrov
07198cf86d
SAM constructors for type aliases.
2016-09-22 10:38:34 +03:00
Denis Zharkov
6663054f4d
Fix false positive "Cannot capture" error reporting
...
There is no need to report an error in case of non-top-level
capture conversion, just don't add relevant capture type in the system instead
If system can be solved successfully without captured type, then it's just fine
(see KT-13950)
In case of contradiction TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR is reported
#KT-13950 Fixed
2016-09-21 18:05:26 +03:00
Denis Zharkov
4431c6ad02
Fix inference when captured type is used as a lambda parameter type
...
Use lower approximation bound to obtain acceptable types for lambda parameters
those types depend on captured type
#KT-12238 Fixed
#KT-10627 Fixed
2016-09-21 18:05:26 +03:00
Mikhail Zarechenskiy
0ba2d374bc
Create standard script definition from standard template
...
Now each script without specified template has a StandardSriptTemplate
class as a base one. This allows to generalize script codegen and
resolve.
2016-09-20 15:44:44 +03:00
Dmitry Petrov
bfcf7d9890
DM 19.09.2016: typealiases private in file are resolved as classes.
...
Add test for typealias private in file.
2016-09-20 14:42:29 +03:00
Dmitry Petrov
dac9d8b845
Additional checks for type alias constructors.
2016-09-20 10:55:36 +03:00
Dmitry Petrov
796d11c860
ClassDescriptor is now a super-interface for ClassConstructorDescriptor and TypeAliasConstructorDescriptor.
2016-09-20 10:55:36 +03:00
Dmitry Petrov
b31ab729de
Containing declaration for TypeAliasConstructorDescriptor
...
is a corresponding TypeAliasDescriptor.
2016-09-20 10:55:36 +03:00
Denis Zharkov
72d027d968
Introduce language feature DestructuringLambdaParameters
...
#KT-5828 Fixed
2016-09-19 20:22:57 +03:00
Denis Zharkov
e975d32196
Implement resolution of desctructuring declarations in lambdas
...
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Denis Zharkov
ace3655824
Minor. Rename diagnostic tests: multiDeclarations -> destructuringDeclarations
2016-09-19 20:22:57 +03:00
Dmitry Petrov
34240e2ff9
Create special descriptor for an object corresponding to type alias.
2016-09-16 15:44:44 +03:00
Mikhail Glukhikh
c1296e2134
Retain nullability information for type alias arguments which are in turn type aliases #KT-13835 Fixed
2016-09-16 10:30:43 +03:00
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +03:00
Alexander Udalov
fea116f14e
Allow data classes to implement equals/hashCode/toString from base classes
...
#KT-11306 Fixed
2016-09-15 16:45:48 +03:00
Alexander Udalov
22f8e7db3b
Use independent context to type-check LHS of '::'
...
#KT-13110 Fixed
2016-09-15 16:45:48 +03:00
Denis Zharkov
556df93ca7
Refine diagnostic about type arguments for an outer class
...
#KT-11263 Fixed
2016-09-15 10:33:19 +03:00
Denis Zharkov
7ca84649d7
Fix implicit type arguments resolution for inner classes
...
When resolving arguments on inner classifier, one can omit the arguments
for outer class 'Outer' if they are present implicitly in the scope:
- One of the supertypes of current class is Outer
- One of the outer classes or one of their supertypes is Outer
Relevant arguments are obtained from the first type found by
the algorithm above
Note that before this commit implicit arguments were only been searched
in containing classes
#KT-11123 Fixed
2016-09-15 10:33:19 +03:00
Dmitry Petrov
dae4521c68
KT-13822 Exception in the compiler for start-projection of a type alias
...
Use ClassifierWithTypeParameters in StarProjectionImpl.
2016-09-13 15:09:47 +03:00
Denis Zharkov
fc5217f7fc
Fix signature clash problems caused by special built-ins
...
Do not treat members with already changed signature as a reason
to create a hidden copy
See tests for clarification:
- There are `charAt` method in B that has different name in Kotlin - `get`,
i.e. relevant descriptor has initialSignatureDescriptor != null
- When collecting methods from supertypes, `charAt` from A is also get
transformed to `get`
- So it has effectively the same signature as B.get (already declared)
- If by an accident B.get had been declared with Kotlin signature
we would have add A.charAt (after transformation) with special flag:
HiddenToOvercomeSignatureClash (hides it from resolution)
- But here B.charAt was artificially changed to `get`, so no signature clash
actually happened
#KT-13730 Fixed
2016-09-09 16:33:32 +03:00
Simon Ogorodnik
2b63bcaa19
Correct diagnostics and quick-fix for T::class with non-reified type parameter #KT-9590 fixed
2016-09-09 16:14:11 +03:00
Denis Zharkov
257417bc4a
Minor. Lower type aliase declarations priority
...
There are several reasons for doing this:
- See org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.computeDescriptors,
classifiers are being deserialized in the last turn, so it's necessary to preserve consistent order
- Their priority should be close to classes
2016-09-09 10:27:35 +03:00
Michael Bogdanov
8d2ffb2dab
Fix wrong "InlineProperties are unsupported at this language level" error on inline functions when inline properties are disabled
2016-09-07 17:39:09 +03:00
Alexander Udalov
cb209074d3
Minor, add regression test on incomplete code with callable reference
...
#KT-13685 Fixed
(cherry picked from commit c8b30d3310c990193414d7f82bedd50189e0109c)
2016-09-05 13:13:57 +03:00
Dmitry Petrov
6428a7655d
KT-13422 Type alias for Java exception class can be used as an object in 'throw' expression
...
Report NO_COMPANION_OBJECT for type aliases.
2016-09-02 10:18:22 +03:00
Stanislav Erokhin
bebc75c8ef
Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.
...
#KT-2787 Fixed.
2016-09-01 18:01:55 +03:00
Mikhail Glukhikh
cd717467f0
Nested classes are no more allowed inside any anonymous objects or local classes #KT-13510 Fixed
...
(cherry picked from commit 5c3ec6c)
2016-08-31 19:28:13 +03:00
Mikhail Glukhikh
f8039249c6
CFA: additional jumps to catch / finally generated in the end of try / before exits from try #KT-5469 Fixed
...
Also #KT-13612 Fixed
(cherry picked from commit 7c188b3)
2016-08-31 19:28:09 +03:00
Mikhail Glukhikh
6a9d058db4
UNUSED_VALUE is now reported on expression only if this expression is unused in all (e.g. finally) branches #KT-9825 Fixed
...
(cherry picked from commit aac8e94)
2016-08-31 19:28:00 +03:00
Mikhail Glukhikh
25eefdb6ec
Pseudocode label now cannot be bound to a non-owning pseudocode #KT-13555 Fixed
...
Also EA-77641 Fixed
(cherry picked from commit 07643ce)
2016-08-25 10:32:04 +03:00
Mikhail Glukhikh
d08d8af407
USELESS_ELVIS_RIGHT_IS_NULL : build fix (add to different files in DiagnosticsTestGenerated), do not report if USELESS_ELVIS already exists
...
(cherry picked from commit c71b656)
2016-08-23 16:26:54 +03:00
shiraji
a3f131d6c6
KT-13521 Warning right part of "expression ?: null" is useless
...
#KT-13521 Fixed
2016-08-23 01:10:10 +09:00
Mikhail Glukhikh
ac3dfd93bd
More correct handling of compile time constant types #KT-13421 Fixed
2016-08-18 14:42:16 +03:00
Mikhail Glukhikh
ae856e834a
Store map (Call to KotlinType) for SMARTCAST slice #KT-13426 Fixed
...
Also EA-86848 Fixed
2016-08-17 16:09:45 +03:00
Mikhail Glukhikh
cbcef67d82
KT-13426: store map from ImplicitReceiver into KotlinType for implicit receiver smart casts
2016-08-17 16:09:34 +03:00
Ilya Gorbunov
d943079557
Exception typealiases rendering in test output
2016-08-17 12:40:50 +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
7b8ee5fba1
Add test case for obsolete issue
...
#KT-13172 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov
bd88b0941d
Fix incorrect unsupported error on synthetic extension call on LHS of ::
...
#KT-13271 Fixed
2016-08-15 19:41:47 +03:00
Stanislav Erokhin
85a951db52
Fixed exception AssertionError: Illegal resolved call to variable with invoke
...
#KT-13330 Fixed
#KT-13349 Fixed
2016-08-15 19:24:17 +03:00
Mikhail Glukhikh
1c5c6506ce
Report of UNINITIALIZED_ENUM_COMPANION also for implicit receivers #KT-11769 Fixed
2016-08-12 15:06:43 +03:00
Mikhail Glukhikh
04f71bccf2
KT-11769 case with companion function call: error is now detected if companion receiver is stated explicitly
2016-08-12 15:06:38 +03:00
Mikhail Glukhikh
6cf90cfc4e
Fix for SOE in VarianceChecker #KT-13401 Fixed
2016-08-11 13:04:58 +03:00
Mikhail Glukhikh
d21061ff60
CAST_NEVER_SUCCEEDS: some type alias tests (1.1 only!)
2016-08-10 12:23:09 +03:00
Mikhail Glukhikh
687698da9a
Do not report USELESS_CAST when casting null to nullable (special case)
2016-08-10 12:23:02 +03:00