Alexander Udalov
9008a8b161
Fix withKotlin Ant task when no classpath is given
...
#KT-6492 Fixed
2015-06-05 15:55:51 +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
Evgeny Gerashchenko
c194ced87e
Performance report is emitted only when corresponding command-line argument is provided.
2015-06-04 19:45:01 +03:00
dnpetrov
50ea67ba13
KT-5524 Support [platformName] annotation for class members
...
@platformName is now supported for final non-overriding class member functions
(including property accessors).
Front-end provides diagnostics for inapplicable annotation cases.
Code generation updated:
- ignore kotlin.platform.platformName annotation for Java class methods;
- bridges generation generates proper JVM declarations in case of methods renamed with @platformName.
@platformName-related tests added.
#KT-5524 Fixed
2015-06-04 17:54:08 +03:00
Michael Bogdanov
dee26957d1
Tests for obsolete KT-4798, KT-7288, KT-7046
...
#KT-4798 Obsolete
#KT-7288 Obsolete
#KT-7046 Obsolete
2015-06-04 16:28:08 +03:00
Denis Zharkov
9802931a90
Remove variables with empty ranges from local vars table
...
As their ranges may intersect after dead code elimination that leads to VerifyError
2015-06-04 16:11:02 +03:00
Denis Zharkov
8da3f53404
EA-53937: Drop failing assertion about no-name val in annotation
2015-06-04 16:11:02 +03:00
Michael Bogdanov
83f04501be
Remove error diagnostic from return in multideclaration
...
#KT-5100 Fixed
2015-06-04 12:01:59 +03:00
Michael Bogdanov
2377a10007
Fix labeling processing on inlining: suport labeled literals
...
#KT-7273 Fixed
2015-06-03 14:42:57 +03:00
Pavel V. Talanov
f02f663167
Minor: fix test data
2015-06-03 14:29:44 +03:00
Pavel V. Talanov
ccaa779e2f
Minor: fix test
2015-06-02 19:06:27 +03:00
Alexander Udalov
d1df234cfe
Support annotations as annotation arguments in reflection, add test
...
A follow-up to 281acb8 where this was supported in the compiler
2015-06-02 17:31:19 +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
Denis Zharkov
9c574469ca
Parsing: allow primary ctor in object syntactically
...
It's needed for better recovering for cases of changes like 'class' -> 'object'
The only sensible case when it's may be bad:
class A {
object B
constructor() : super()
}
But it seems to be rare, and ';' can be used to separate object from secondary ctor
2015-06-02 14:07:48 +03:00
Denis Zharkov
19e4127f4f
Do not wrap primary ctor of object into ErrorElement
...
It helps to resolve them as for classes
Diagnostic with same content will be reported instead
2015-06-02 13:18:53 +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
Mikhail Glukhikh
de12771c0f
Warning generation on non-exhaustive whens over enums + a set of tests + fixed test #KT-6227 Fixed
2015-06-02 10:56:17 +03:00
Mikhail Glukhikh
969993bd09
Fix for EA-68871 #EA-68871 Fixed
2015-06-02 10:56:13 +03:00
Alexander Udalov
12a6461006
Report 'free function called as extension' on Function subclasses
...
You can't make a value of some type invokable as an extension by adding
'extension' annotation to the type
2015-06-01 19:23:10 +03:00
Alexander Udalov
596d378962
Fix abstract method error: implement arity in function references
2015-06-01 19:23:09 +03:00
Alexander Udalov
28addcf8e7
Do not generate annotations of method parameters on its $default synthetic method
...
#KT-7892 Fixed
2015-06-01 19:23:08 +03:00
Alexander Udalov
df4d5a3ae2
Fix initialization order of enum entries and companion
...
#KT-5761 Fixed
2015-06-01 19:23:08 +03:00
Alexander Udalov
7ba0dda29c
Check compileJavaAgainstKotlin tests with .txt files
2015-06-01 19:23:07 +03:00
Zalim Bashorov
f3f799aab5
Fix secondary constructor tests for JS -- use non-zero fracitional part
2015-05-28 10:25:12 +03:00
Zalim Bashorov
3fe363e72b
Minor: split test to access to companion and to nested object
2015-05-28 10:25:11 +03:00
Zalim Bashorov
dc1b91eacd
JS: prepare tests for secondary constructors
2015-05-28 10:24:48 +03:00
Zalim Bashorov
72c2648fc8
JS frontend: remove diagnostics about the secondary constructors are not supported
2015-05-28 10:24:47 +03:00
Alexander Udalov
d14e5b8a72
Restore and deprecate Function{n}/ExtensionFunction{n} classes for easier migration
...
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.
Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
2015-05-28 01:20:05 +03:00
Mikhail Glukhikh
3ad06f169d
Solution for EA-66870: Foo<in *> and Foo<out *> types are now treated as incorrect.
...
#EA-66870 Fixed.
2015-05-27 19:07:46 +03:00
Mikhail Glukhikh
4fb331ecd3
Solution for KT-7838: now data flow information at the end of when expression is determined correctly.
...
#KT-7838 Fixed.
2015-05-27 19:07:41 +03:00
Michael Bogdanov
e20a5121c7
Support private package properties in inline functions
2015-05-27 18:09:40 +03:00
Valentin Kipyatkov
df850d7035
DeprecatedSymbolUsageFix: initial implementation
2015-05-27 16:15:45 +03:00
Dmitry Jemerov
1188e57597
rename @overloads annotation to @jvmOverloads
2015-05-27 12:23:08 +02:00
Alexander Udalov
6ae7ed1cc4
Add some new tests on functions and extension functions
2015-05-27 01:44:19 +03:00
Ilya Gorbunov
84ca26719d
Deprecate meaningless or vague-defined operations with Char operands.
...
Change expected test output.
2015-05-27 00:58:35 +03:00
Alexey Sedunov
b6ea2d4fd4
Control-Flow: Compute type predicates for arguments of unresolved calls
2015-05-26 19:29:04 +03:00
Alexey Sedunov
3d3b5591e1
Control-Flow: Improve debug text of ReadValueInstruction
2015-05-26 19:28:09 +03:00
Alexey Sedunov
868329e3cb
Control-Flow: Fix pseudocode generation for combined get/set and invoke conventions
...
#KT-4462 Fixed
#KT-4681 Fixed
2015-05-26 19:28:07 +03:00
Mikhail Glukhikh
4570872bfd
Postfix expression code generation fixed as per KT-7561.
...
A set of tests for KT-7561 on codegen side, including exotic inc() functions().
#KT-7561 Fixed.
2015-05-26 15:20:37 +03:00
Mikhail Glukhikh
5723c2a077
Front-end fix: result type corrected for increment / decrement expressions. Smart cast allowed on a postfix increment result. See KT-7561.
...
Now result type is receiver type for postfix increment, or increment result type for prefix increment.
A set of relevant tests.
2015-05-26 15:20:25 +03:00
Alexander Udalov
ea6d0b464d
Report error when free function is called as extension
2015-05-26 15:05:04 +03:00
Svetlana Isakova
14c2690447
Distinguish between no declared arguments and an empty argument list
...
in a function literal
If there are no arguments, any number of them might be expected
2015-05-26 15:05:03 +03:00
Alexander Udalov
4d00077ffb
Delete assertion on receiver presence in 'invoke'
...
#KT-6541 Fixed
#KT-7383 Fixed
2015-05-26 15:04:59 +03:00