Stanislav Erokhin
8f0b073c08
[NI] Prototype for SAM-conversion.
...
Supported:
- conversion in resolution parts. Also sam-with-receiver is supported automatically
- separate flag for kotlin function with java SAM as parameters
TODO:
- fix overload conflict error when function type is the same byte origin types is ordered
- consider case when parameter type is T, T <:> Runnable
- support vararg of Runnable
[NI] Turn off synthetic scope with SAM adapter functions if NI enabled
2018-06-04 12:21:56 +03:00
Stanislav Erokhin
99e7823352
[NI] Disable test with disabled RefinedSamAdaptersPriority in NI
...
Such test has no ense in NI because NI it is LV = 1.4 and we cannot
repeat behaviour in 1.3 anyway, so I propose not even support old cases.
Also priority of LANGUAGE directive should be more then key enabled on
all tests -- also fixed.
2018-06-04 12:21:50 +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
baratynskiy
01883a41cb
javac-wrapper: refactoring, fixes and tests
2017-08-29 18:01:36 +03:00
Mikhail Zarechenskiy
7a9e1b2b1d
Improve diagnostic on overload resolution ambiguity
...
Report type mismatch on argument when a nullable argument is passed to non-null parameter.
Note that this affects only functions with simple types without generics
#KT-2007 Fixed
#KT-9282 Fixed
2017-06-22 13:41:31 +03:00
Mikhail Zarechenskiy
4b3ffd9418
If all candidates are invisible then don't report ambiguity
...
#KT-10045 Fixed
2017-06-22 13:41:28 +03:00
Mikhail Zarechenskiy
7541a3754d
Move SAM constructors to synthetic scope
2017-05-05 21:30:35 +03:00
Mikhail Zarechenskiy
95ede7fb67
Move SAM adapters from static scope to synthetic one
2017-05-05 21:30:10 +03:00
Mikhail Glukhikh
7a53b2f4c8
Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
...
It is not reported for 1.0 language version because
renaming to _ is not possible. It has weak warning severity
So #KT-8813 Fixed
So #KT-16875 Fixed
2017-04-04 14:23:30 +03:00
Mikhail Zarechenskiy
e448695578
Introduce language feature for refined sam adapters priority
2016-12-27 16:44:23 +03:00
Denis Zharkov
891a036b59
Change resolution priority level for SAM adapters
...
After this change SAM adapters are being resolved in the same group
as members, thus their overload resolution happens simultaneously.
But in the case of overload resolution ambiguity try to filter out all
synthetic members and run the process again.
See the issue and new test for clarification
#KT-11128 In Progress
2016-12-07 21:04:44 +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
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
7f0063013c
Corrected test data
2016-10-11 23:38:52 +03:00
Valentin Kipyatkov
59269ef1ae
ParameterName annotation on type argument used to hold parameter name
2016-10-11 23:38:51 +03:00
Valentin Kipyatkov
41ee06ec96
Use parameter names in DescriptorRenderer
2016-10-11 23:38:49 +03:00
Denis Zharkov
bc1b34a989
Add additional visibility check for synthetic extensions
...
Use extension receiver as dispatch one, because it is effectively dispatch
(after some desugaring)
2016-03-31 14:51:57 +03:00
Denis Zharkov
151e55b2fa
Use descriptors for building SAM constructors
...
It helps to get rid of semantics duplicating and fixes known bugs
- SOE in OnlyAbstractMethodFinder.find
- type enhancement for SAM constructors
#KT-11287 Fixed
#KT-11322 Fixed
EA-77989 Fixed
2016-03-10 16:49:00 +03:00
Valentin Kipyatkov
a1d760fc36
KT-10631 Consider creating a synthetic property even when the setter returns 'this'
...
#KT-10631 Fixed
2016-01-19 15:57:20 +03:00
Alexander Udalov
0ba0ea5e1f
Report 'unsupported' on synthetic Java property references
...
#KT-8575 Open
2015-12-16 19:50:15 +03:00
Dmitry Petrov
ef72c594c4
KT-1934 & KT-10197:
...
Naive approximation for fake overriding signature:
use upper bound for flexible types.
Check delegation errors.
2015-12-09 17:43:47 +03:00
Mikhail Glukhikh
811ba8110f
Implicit receiver smart casts implementation and highlighting
2015-11-17 10:26:42 +03:00
Valentin Kipyatkov
8e6b0a26bb
Synthetic extensions to take all annotations from original declarations
...
#KT-9387 Fixed
2015-10-20 10:12:34 +03:00
Denis Zharkov
f0e3fd617d
Adjust testData to CharSequence.length transformation
2015-10-14 20:39:35 +03:00
Valentin Kipyatkov
94d8e3f4b6
"is" getter naming allowed for non-booleans too
2015-09-29 18:32:25 +03:00
Valentin Kipyatkov
20bddce18d
No synthetic property for false get-method like "issue()"
2015-09-29 18:32:25 +03:00
Valentin Kipyatkov
8f1a3043de
Synthetic properties made locale-independant too
2015-09-29 18:32:25 +03:00
Denis Zharkov
4850fd10f0
Regenerate test data containing rendered descriptors
...
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Michael Nedzelsky
bc5c9065d2
fix tests in org.jetbrains.kotlin.checkers
2015-09-08 02:04:32 +03:00
Valentin Kipyatkov
d41e01c0e4
Added a test
2015-09-03 15:55:54 +03:00
Valentin Kipyatkov
4c0404ea82
Changes on code review
2015-08-04 18:05:57 +03:00
Valentin Kipyatkov
c3064e2b0f
Synthetic extensions for non-public get/set java methods
2015-08-04 18:05:56 +03:00
Valentin Kipyatkov
d5f95cf126
Correct visibility for non-public SAM-adapters
2015-08-04 18:05:56 +03:00
Valentin Kipyatkov
cb9ef9e1f0
Fixed nullability for return and parameter types in SAM-adapters
2015-08-04 18:05:56 +03:00
Valentin Kipyatkov
729085ec9a
Iniital implementation of synthetic extensions for SAM-adapter functions (non-static only)
2015-08-04 18:05:55 +03:00
Denis Zharkov
97af85da9c
Change default upper bound of Java type parameters to Any!
...
#KT-7672 Fixed
2015-07-21 15:16:05 +03:00
Valentin Kipyatkov
4ec26de2a8
Changes on code review
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
31b7c33fa8
No need to scan base classes
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
1c52f8a524
Fixed synthetic properties for method inherited from two bases
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
612c009f6b
Synthetic properties: correct behaviour for method hierarchies
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
367e294452
No synthetic properties in java class for methods inherited from Kotlin
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
d2fb7381ce
Tested one more case
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
4a8adacedd
Changed policy for properties from methods like "getURL()""
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
23cfe88b71
KT-8530 Synthetic properties doesn't work with smart casts
...
#KT-8530 Fixed
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
b6027a0efe
Changed synthetic properties naming for getters starting with "is"
2015-07-21 08:32:49 +03:00
Valentin Kipyatkov
28e9fbf9b8
Correct synthetic extensions for methods like "getURL"
2015-07-16 13:49:18 +03:00
Valentin Kipyatkov
22e631dda3
Naming with "is" supported for synthetic extensions
2015-07-16 13:49:18 +03:00
Valentin Kipyatkov
2ec6f50402
Set method should not accept vararg
2015-07-16 13:49:15 +03:00
Valentin Kipyatkov
82f1eafa0b
No synthetic properties of type Unit
2015-07-16 13:49:15 +03:00