Mikhail Zarechenskiy
787a8bb9bd
Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
...
This reverts commit 7c4101e21c .
#KT-31866 Fixed
#KT-31868 Fixed
#EA-125401 Fixed
#KT-25290 Open
2019-06-07 12:31:38 +03:00
Dmitriy Novozhilov
7c4101e21c
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
2019-05-29 10:35:46 +03:00
Mikhail Zarechenskiy
848640253a
Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
...
This reverts commit f20ec3e0a6 .
2019-05-29 01:31:28 +03:00
Dmitriy Novozhilov
f20ec3e0a6
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
...
There is added a new service named `SubstitutingScopeProvider`, that
provides factory that creates captured types and approximator for them.
In OI they are the same as before commit, for NI they are empty, because
that approximation interferes with NI algorithm
That service is injected into function descriptors and property descriptors
and used for creating `SubstitutingScope` with correct services
Also there is changed time when we approximate captured types in NI
(after all call checkers)
#KT-25290 Fixed
2019-05-28 11:18:33 +03:00
Dmitriy Novozhilov
d8cbeb8d15
Add regression test for SPREAD_OF_NULLABLE diagnostic
...
#KT-30808 Fixed
2019-04-05 14:17:34 +03:00
Dmitriy Novozhilov
2ba33c3b8a
Fix testdata broken in 46bd5ba
2019-02-21 12:04:23 +03:00
victor.petukhov
46bd5ba107
Add alphabetical sorting diagnostics with same ranges
2019-02-14 12:31:42 +03:00
Dmitriy Novozhilov
7f48897e21
Add NON_VARARG_SPREAD and SPREAD_OF_NULLABLE diagnostics to new inference
2019-01-24 10:53:58 +03:00
Mikhail Glukhikh
f3555daa60
Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed
2018-10-25 19:10:39 +03:00
Mikhail Zarechenskiy
6dc36055b8
Make diagnostic about redundant spread in @Foo(s = *[A]) more clear
2018-07-06 15:54:23 +03:00
Mikhail Zarechenskiy
513b27f65f
Make tests about varargs compatible with 1.2 and 1.3 versions
2018-07-06 15:23:33 +03:00
Mikhail Zarechenskiy
c032a02373
Prohibit assigning single elements into varargs in named form
...
#KT-20588 Fixed
#KT-20589 Fixed
2018-07-06 15:23:31 +03:00
Mikhail Zarechenskiy
6086cd2cf4
Prohibit non-const expressions through varargs in annotations
...
Fixes #KT-23153 for Kotlin 1.3
The problem was in the type check of expression type against expected type. When feature `AssigningArraysToVarargsInNamedFormInAnnotations` (KT-20171) appeared, expected type could be wrong, which led to failed type check
2018-03-22 04:03:04 +03:00
Dmitry Savvinov
8e50a58408
[NI] New failing test after changes in applicabilities
2017-12-07 12:49:56 +03:00
Mikhail Zarechenskiy
8757298994
Add diagnostics to test data from NI
2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy
a71238bf94
Place !WITH_NEW_INFERENCE directive to diagnostics test data
2017-11-29 02:53:49 +03:00
Mikhail Zarechenskiy
69e3dd89f6
Split diagnostic factory for the ease of code evolution and tooling
2017-09-26 14:49:42 +03:00
Mikhail Zarechenskiy
b574ddfba0
Deprecate syntax for assigning single named arguments to varargs
...
See more in KT-20171
2017-09-14 18:27:43 +03:00
Mikhail Zarechenskiy
68259f7939
Allow assigning array to vararg in named form in annotations
...
See more in KT-20171
2017-09-14 18:27:41 +03:00
Mikhail Glukhikh
af3a123c15
Report WRONG_MODIFIER_CONTAINING_DECLARATION for vararg in setter
2017-05-26 09:47:51 +03:00
Dmitry Petrov
6e2ebaa300
KT-12846 Forbid vararg of type 'Nothing' and 'Nothing?'
2017-01-20 17:50:19 +03:00
Ilya Gorbunov
f4822cd757
Fix testData in compiler: add collections and ranges package to fq-names.
2016-01-22 05:54:38 +03:00
Michael Nedzelsky
2fa34ae170
KT-9883 prohibit using spread operator for nullable value
...
#KT-9883 Fixed
2015-11-26 19:42:34 +03:00
Dmitry Jemerov
7c20630272
diagnostics for deprecated syntax of function type parameter list
2015-10-06 16:20:47 +02:00
Michael Nedzelsky
bc5c9065d2
fix tests in org.jetbrains.kotlin.checkers
2015-09-08 02:04:32 +03:00
Dmitry Jemerov
f374eec8f1
deprecating types after colon
2015-04-29 16:33:24 +02:00
Denis Zharkov
f07566d30d
Add warning for initializers with obsolete syntax
...
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Evgeny Gerashchenko
897854b3dc
KT-6671 Report unused constructor parameters
...
#KT-6671 fixed
2015-01-27 22:38:27 +03:00
Svetlana Isakova
7a5124215a
Updated test data for Array<out T> vararg type
2014-12-12 23:08:28 +03:00
Svetlana Isakova
5b4f10e698
Made vararg parameters have Array<out T> type
...
instead of simply Array<T>
#KT-1638 Fixed
#KT-2163 Fixed
#KT-3213 Fixed
#KT-4172 Fixed
#KT-5534 Fixed
2014-12-12 23:08:28 +03:00
Nikolay Krasko
75c887048e
Drop AbstractLazyResolveRecursiveComparingTest test
...
Test data from compiler/testData/lazyResolve/ was moved to diagnostics tests
2014-12-03 14:08:23 +03:00
Andrey Breslav
0eee83b6ec
Lazy logs removed
2014-11-21 18:59:45 +03:00
Svetlana Isakova
2a83053355
Updated lazy log tests
2014-11-21 14:02:45 +03:00
Stanislav Erokhin
b7c473f59e
Update lazy.log files
2014-11-17 17:45:01 +03:00
Alexander Udalov
4f0d83a7fe
Update lazy logs after field rename
2014-11-11 18:35:39 +03:00
Andrey Breslav
4892369cf4
Diagnostic tests are logging their lazy activity
2014-11-10 17:24:04 +02:00
Alexander Udalov
3a8ad45dec
Append newline to EOF for .txt test data files
...
Reverts and fixes 102f0d3
2014-10-21 03:18:27 +04:00
Andrey Breslav
6564231040
Descriptor test data for diagnostic tests fixed
2014-10-13 15:38:10 +04:00
Nikolay Krasko
e796f88b38
Regenerate test data with constructed descriptors for diagnostics tests
2014-09-18 17:58:23 +04:00
Svetlana Isakova
791fa22abb
KT-4405 Control-flow analysis is not performed for some local declarations #KT-4405 Fixed
2014-02-12 12:48:13 +04:00
Svetlana Isakova
c739632c57
report 'ambiguity' on reference, not on the whole expression
...
as other type inference errors
2013-09-03 13:09:15 +04:00
Svetlana Isakova
da4f1aec1d
KT-422 Tune literal typing rules so that varargs overloaded by primitive types work
...
#KT-422 fixed
2013-02-08 15:10:39 +04:00
Andrey Breslav
bbde38a6dc
KT-1360 Vararg bug in front-end
2013-01-31 18:54:37 +04:00
Andrey Breslav
3d8d92c7d3
JetDiagnosticsTest migrated to TestGenerator
...
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00
Andrey Breslav
789ff0b273
KT-1838 Constructor with a vararg
...
Resolution for properties declared as primary constructor parameters used to ignore the varargs annotation.
#KT-1838 Fixed
2012-04-23 14:16:07 +04:00
Andrey Breslav
45a0873afa
KT-1835 cannot call a Java API which has a method from(String) and from(String...)
...
The problem was in the "more specific" relation, that didn't pay enough attention to varargs.
The correct behavior is in the spirit of JLS 15.12.2 (as of Java 5):
* a fixed-arity function always wins over a variable-arity functions
* if two vararg functions are compared, their parameters are checked for subtyping.
In the latter case, the candidates may have different number of formal parameters, so we
compare the matching parts and then check the rest against the vararg parameter.
#KT-1835 Fixed
2012-04-20 19:10:10 +04:00
Andrey Breslav
0f98c281ab
KT-1781 Can't distinguish between two constructors
...
#KT-1781 Fixed
Now, if foo() and foo(vararg bar) both match the call site, the first one is preferred
2012-04-16 16:14:08 +04:00