Ilya Gorbunov
9acfde7c5a
Revert changes from daac46b since kotlin.Comparator now has lower priority than explicit star-import of java.util.*
2016-12-15 13:39:10 +03:00
Alexey Andreev
dadffebe97
Support external modifier in descriptor renderer. Update test data.
2016-12-08 15:41:43 +03:00
Alexey Andreev
7e37d5d6fa
Prohibit external modifiers on classes and properties in JVM target
2016-12-08 15:41:42 +03:00
Mikhail Zarechenskiy
240d82d167
Move reified type parameter checker to additional checkers to able turn it off by demand
2016-12-01 10:06:38 +03:00
Dmitry Jemerov
b8525de726
Disallow @JvmOverloads on any interface methods
...
#KT-12224 Fixed
2016-11-18 11:05:02 +01:00
Dmitry Jemerov
79e90b32e8
@JvmOverloads on local declarations is now an error
2016-11-18 11:05:01 +01:00
Dmitry Jemerov
12e4cf9a4f
Report @JvmOverloads errors on annotation, not on entire declaration (KT-12701)
2016-11-18 11:05:00 +01:00
Ilya Gorbunov
daac46bce5
Fix rendering in test output after introducing type aliases for the types used in those tests.
2016-11-16 18:47:42 +03:00
Dmitry Petrov
37eedc3703
Hack: do not add trivial constraints (t <: Any?) for constituent types,
...
otherwise nested calls handling logic in old inference wouldn't work for type alias constructors.
2016-11-10 14:54:11 +03:00
Alexander Udalov
035d6156a7
Drop Cloneable in JS, synthesize it at compile-time on JVM
...
Use the same approach that is used for creating function type classes
(Function{0,1,...}) + add Cloneable to supertypes of Array and primitive arrays
#KT-5537 Fixed
2016-10-25 15:42:33 +03:00
Denis Zharkov
4c69416f2b
Report warning on unused entities that can be renamed to _
...
Currently it's all about lambda parameters/destructuring entries
#KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Ilya Gorbunov
82364ad3e5
Filter out typealiases invisible due to API_VERSION < their SinceKotlin version, when determining excluded imports.
2016-10-21 18:19:03 +03:00
Dmitry Petrov
c6350e1afb
Concatenate annotations in type alias expansion.
2016-10-13 17:44:14 +03:00
Mikhail Glukhikh
7a41d13b41
Do not add special names to scopes #KT-14319 Fixed
2016-10-13 17:17:05 +03:00
Valentin Kipyatkov
ec51076355
DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers
2016-10-11 23:38:54 +03:00
Valentin Kipyatkov
4513f679de
Fixed test data
2016-10-11 23:38:53 +03:00
Alexander Udalov
45190d9453
Support separate modules in compiler
...
Unless the compatibility option "-Xsingle-module" is passed, the compiler will
create two modules instead of one now (see TopDownAnalyzerFacadeForJVM): the
main module contains Kotlin and Java sources and binaries from the previous
compilation of the given module chunk, the dependency module contains all other
Kotlin and Java binaries. This fixes some issues where the compiler couldn't
detect that the used symbol was from another module, and did not forbid some
usages which are only possible inside the module (see KT-10001).
The ideal way to deal with modules here would be to exactly recreate the
project structure, for example as it's done in JvmAnalyzerFacade and usages.
This is postponed until later
#KT-10001 Fixed
#KT-11840 In Progress
2016-10-02 21:15:47 +03:00
Dmitry Petrov
07198cf86d
SAM constructors for type aliases.
2016-09-22 10:38:34 +03:00
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +03:00
Alexander Udalov
127e7ab5b7
Reflection: add KClass.typeParameters, KCallable.typeParameters
...
Inheritance from KCallable is removed in kt9078.kt because it was irrelevant to
the test and because it gets in the way of modification of KCallable
2016-08-08 17:54:11 +03:00
Mikhail Glukhikh
b56e84d47f
Cast never succeeds: special 'Nothing' / 'Nothing?' case
...
(cherry picked from commit 63435b4)
2016-07-27 10:52:13 +03:00
Alexander Udalov
9be219b69c
Check presence of dispatch receiver parameter in modifier checks
...
Also fix typo in "inapplicable infix" diagnostic message
2016-07-22 18:13:39 +03:00
Alexander Udalov
ff72348105
Report error on protected setter call from super's companion
...
#KT-12847 Fixed
2016-06-29 22:03:35 +03:00
Alexander Udalov
6ba32ed624
Refactor CallChecker and subclasses
...
Encapsulate everything that is needed in checkers into CallCheckerContext. Pass
an instance of this context instead of BasicCallResolutionContext to checkers.
Also pass an instance of the element to report errors on: this is useful
because before this, every checker had its own way of determining where should
the error be reported on. Some of them, for example, were not doing anything if
Call#calleeExpression returned null, which is wrong, see operatorCall.kt
#KT-12875 Open
2016-06-29 19:20:00 +03:00
Nikolay Krasko
eee45e91ce
Add more tests for PropertyAccessorDescriptor.isDeafult() usages
2016-06-29 16:16:31 +03:00
Stanislav Erokhin
01430b4b99
Create hack for exception about "Empty intersection for types".
...
Hackaround for KT-11266, EA-79963, EA-72093, EA-79976.
2016-06-17 01:39:44 +03:00
Mikhail Glukhikh
be40cf8138
KT-12152 : constructor consistency: distinguish properties with and w/o backing fields, with default / custom accessors
2016-06-03 09:45:49 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Alexander Udalov
117d0bcf03
Fix multiple exceptions related to subtypes of function types
...
The main change is in FunctionsTypingVisitor#visitLambdaExpression, where we
incorrectly allowed subtypes of function types to be expected type during
resolution of lambdas
Also see EA-70485
#KT-9820 Fixed
2016-03-14 19:24:17 +03:00
Mikhail Glukhikh
f76efb68f2
Strictfp on a class is now a warning #KT-11109 Fixed
2016-03-12 13:17:11 +03:00
Dmitry Petrov
8660800af7
Constraint system builder shouldn't drop nullability when comparing signatures for specificity.
2016-03-03 19:23:43 +03:00
Alexander Udalov
8e77e16bbd
Remove leftovers of platformName and platformStatic in test data
...
Drop unnecessary imports, rename some tests
2016-03-02 16:47:04 +03:00
Dmitry Petrov
eb7cf92fbd
Minor. Add a test for KT-10732: no redeclaration for
...
fun <T> List<T>?.foo()
fun <T> List<T>.foo()
2016-03-01 13:54:03 +03:00
Pavel V. Talanov
a4c005fefd
Update existing test data depending on diagnostic parameter rendering
2016-02-26 14:45:11 +03:00
Michael Bogdanov
1b94904684
Prohibited @Strictfp annotation on classes (it's not supported yet), Fix for KT-11109: Strictfp annotation do nothing when applied to class
...
#KT-11109 Fixed
2016-02-25 18:07:51 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Mikhail Glukhikh
7da981e12c
Regression tests #KT-8168 Obsolete
2016-02-05 18:29:40 +03:00
Dmitry Petrov
e4583fd275
Do not report IMPLICIT_CAST_TO_ANY on last statement of lambda with Unit(?) in at least one branch.
2016-02-05 10:44:50 +03:00
Mikhail Glukhikh
60d56b30bf
Safe call arguments are now handled as nullable in generic resolver #KT-9985 Fixed
2016-02-03 18:34:10 +03:00
Yan Zhulanow
da7acd5e73
Check annotations on default property getter/setter
2016-02-02 13:14:56 +03:00
Ilya Gorbunov
911940d458
InlineOnly annotation suppresses NOTHING_TO_INLINE diagnostics.
2016-01-28 19:37:44 +03:00
Mikhail Glukhikh
12b100c541
Regression test #KT-9529 Obsolete
2016-01-28 12:56:12 +03:00
Alexander Udalov
04026dbe84
Make Array<T>(size, init) a constructor of Array
...
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Dmitry Petrov
9db3440e72
Fix type inference issues for 'if' and 'when'.
...
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.
If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Mikhail Glukhikh
d94930149b
Warning for open members in objects
2016-01-26 19:04:17 +03:00
Mikhail Glukhikh
1b8f938260
Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed
2016-01-26 19:04:13 +03:00
Stanislav Erokhin
e53e152f83
Removed hacks for code migration from ConstraintSystemImpl.
2016-01-25 21:53:09 +03:00
Stanislav Erokhin
210c9ab3db
Minor. Added regression tests for: KT-3927, KT-9522, KT-10036, KT-7440, KT-9682, KT-9808, KT-9517, KT-9810, KT-9345.
2016-01-25 19:13:32 +03:00
Denis Zharkov
6c0cd70a22
Introduce PureReifiable annotation
...
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov
4cf1393e81
Minor. Render annotations on type parameters
2016-01-22 19:17:22 +03:00