Dmitriy Novozhilov
f26059a7d3
[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
...
^KT-46860
2021-10-27 16:28:37 +03:00
Denis.Zharkov
507422d3d8
FIR: Fix bare type case with flexible supertypes
2021-10-26 18:45:58 +03:00
Mikhail Glukhikh
1fe7a1ebb3
Add FIR test for KT-35565
2021-10-26 13:38:35 +03:00
Denis.Zharkov
a0a57581ec
FIR: Do not add alias for variables with explicit type
2021-10-20 22:05:24 +03:00
Mikhail Glukhikh
7fc19520a5
FIR: substitute super type during tower building properly #KT-49301 Fixed
2021-10-20 12:17:04 +03:00
Mikhail Glukhikh
b76e61cbc5
FIR: set dispatch receiver type to constructor in deserialization
2021-10-20 12:17:03 +03:00
Mark Punzalan
167dc81d3b
FIR/Analysis API: Get parameter name from function type notation or
...
`@ParameterName` annotation, which is also now added during type
resolution.
2021-10-15 16:19:00 +03:00
Mikhail Glukhikh
f4067f05a2
FIR: forbid java.lang.String(String) constructor in JvmMappedScope
...
#KT-49135 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
09bc729b0e
FirDefaultParametersResolver: process imported from objects properly
...
#KT-49083 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
c5a4a5de42
Make FirArrayOfCallTransformer recursive #KT-49076 Fixed
2021-10-15 01:24:49 +03:00
Mikhail Glukhikh
31db76da56
FIR: fix false positives of INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS
...
#KT-49129 Fixed
2021-10-15 01:24:47 +03:00
Dmitriy Novozhilov
c60ba51f8f
[FIR] Include generated declarations into FIR dump in tests
...
Also include non root package directive of FirFile to dump
2021-10-12 17:26:34 +03:00
Mikhail Glukhikh
7243d30869
Split property use-site targets during FIR building
2021-10-12 16:22:58 +03:00
Mikhail Glukhikh
2a9a1dbb86
FIR: allow diagnostic collection on default property accessors
2021-10-12 16:22:56 +03:00
Mikhail Glukhikh
39fe457f91
Add test reproducing KT-49087 and KT-49069
2021-10-12 16:22:54 +03:00
Denis.Zharkov
9d9f191f51
FIR: Fix exception caused by empty supertypes of java.lang.Object
2021-10-07 17:26:25 +03:00
Nikolay Lunyak
e5d5e5be44
[FIR] Reorder scopes for KT-34822
2021-10-05 19:37:53 +03:00
Roman Golyshev
9b9c51bc8d
[FIR] Fix dispatch receivers on inner classes' constructors
...
1. Inner class constructor should have its outer class as a dispatch
receiver, since it is necessary for the call. Before it was null
2. Substituted inner class constructor should have its original dispatch
receiver type with the proper substitution. Before it was set to the
class itself (since the class was usually passed as a new dispatch
receiver)
Also, modify FIR renderer, so it properly renders the dispatch receiver
of the constructors
2021-10-05 12:17:08 +00:00
Nikolay Lunyak
1363a49d30
[FIR] KT-44939: report REDUNDANT_VISIBILITY for explicit public overriding public
2021-09-30 09:09:19 +00:00
Nikolay Lunyak
9790b81f38
[FIR] Fix missing REDUNDANT_VISIBILITY_MODIFIER
2021-09-24 16:48:51 +00:00
Abduqodiri Qurbonzoda
261d0c2783
Promote collection builders to stable #KT-47421
2021-09-21 11:25:28 +00:00
Nikolay Lunyak
ba8dc49a31
[FIX] Move backing field bytecodeListing tests to a separate folder
2021-09-17 15:29:35 +03:00
Tianyu Geng
765cad8448
FIR checker: substitute type parameters in dispatch receiver type
...
Consider the following code:
```
fun test(a: List<String>) {
a.first()
}
```
The dispatch receiver type of `first` in this case is `List<T>` before
this change. After this change, it's `List<String>`.
In addition, this change also replace the dispatch receiver type with
the more specific type if available. For example, consider the following
```
class MyList: ArrayList<String>()
fun test(a: MyList) {
a.get(0)
}
```
The dispatch receiver type of `get` is `MyList`, instead of
`ArrayList<String>`. That is, a fake override is created in this case.
2021-09-17 01:59:06 +03:00
Roman Golyshev
bb2b0107c6
[FIR] Render backing fields by FirRenderer
2021-09-15 18:33:43 +00:00
Tianyu Geng
dfc36ec614
FIR checker: ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_(ANNOTATION|FUNCTION)
2021-09-15 12:11:41 +03:00
Tianyu Geng
e95de0a778
FIR checker: report type mismatch for named vararg arguement
...
ProhibitAssigningSingleElementsToVarargsInNamedForm is enabled from 1.3
so there is no need to make FIR accepting single element passed through
named arguments.
In addition, we may want to report only
ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION and not arg
type mismatch. But FE1.0 is reporting both so I am following it. If we
want to remove the redundant report, we will probably want to remove
FirNamedVarargChecker and report during resolution as a cone diagnostic.
2021-09-15 12:11:36 +03:00
Denis.Zharkov
ef684c0dff
FIR: Improve error reporting for EXPRESSION_EXPECTED_PACKAGE_FOUND
2021-09-14 19:13:47 +03:00
Denis.Zharkov
226893c648
FIR: Adjust test data to correct from FE 1.0 point-of-view behavior
...
^KT-38031 Related
2021-09-14 19:13:41 +03:00
Denis.Zharkov
6e6be7c953
FIR: Adjust test data
...
Currently, we've got two places where NO_COMPANION_OBJECT is reported
and they perform it kind of differently
2021-09-14 19:13:40 +03:00
Nikolay Lunyak
0181c80ddb
[FIX] Add some more tests
2021-09-14 18:42:27 +03:00
Ivan Kochurkin
a816bd9a33
[FIR] Add JVM_INLINE_WITHOUT_VALUE_CLASS, VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION
2021-09-13 20:49:00 +03:00
Ivan Kochurkin
e97933a9e5
[FIR] Add POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION
2021-09-13 20:48:55 +03:00
Ivan Kochurkin
dd46c36b24
[FIR] Add SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC
2021-09-13 20:48:54 +03:00
Dmitriy Novozhilov
5769d42248
[FIR] Fix all usages of annotations due to new FirAnnotation hierarchy
2021-09-13 13:53:12 +03:00
Nikolay Lunyak
f6ae6af741
[FIR] Add test data
2021-09-11 22:05:43 +03:00
Mikhail Glukhikh
fc6403679a
Rename !USE_EXPERIMENTAL test directive to !OPT_IN
2021-09-10 16:29:16 +03:00
Mikhail Glukhikh
3febabe977
Use OPT_IN instead of EXPERIMENTAL in diagnostic names
2021-09-10 16:29:13 +03:00
Ivan Kochurkin
55f33999f1
[FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING
2021-09-10 00:49:07 +03:00
Mikhail Glukhikh
19a75b31f9
FIR: avoid resolve loop between accessor and other members
...
#KT-48634 Fixed
2021-09-08 14:47:51 +03:00
pyos
9bb7a29baa
FIR: disregard enhancements for warnings
...
Warnings are not implemented yet, so don't produce errors either.
2021-09-06 13:11:16 +03:00
pyos
a2e2545e3f
FIR: update loadJava tests
2021-09-06 13:11:14 +03:00
pyos
090b90f62e
FIR: load type qualifiers from module, package, and parent classes
2021-09-06 13:11:13 +03:00
pyos
03304bce96
FIR: enhance Java type parameter bounds
...
This also fixes handling of self-recursive types.
TODO: fix jspecify/{strict,warn}Mode/Captured.fir.kt
2021-09-06 13:11:08 +03:00
pyos
5355d04553
FIR: enhance in/out-variant type arguments
2021-09-06 13:11:03 +03:00
pyos
8e122397b0
FIR: fix type index computation during enhancement
...
1. in/out type parameters count;
2. star projections take up 1 space in the tree.
2021-09-06 13:11:02 +03:00
pyos
5fec9f34b1
FIR: revert a hack that allows overriding T!! with T
...
1. this should've been only done if the language feature for validating
that is disabled;
2. that feature probably won't matter by the time FIR is stable;
3. it only worked because type enhancement of type arguments is broken
anyway - a more correct hack would be to provide a custom
ConeTypePreparator.
2021-09-06 13:11:01 +03:00
Mikhail Glukhikh
08e498f1f2
FIR: add proper receiver check for protected visibility #KT-48378 Fixed
2021-08-31 17:31:57 +03:00
Denis.Zharkov
62bef48f9d
Adjust test data to changed rendering: T!! -> T & Any
...
^KT-26245 In Progress
2021-08-31 15:41:15 +03:00
Denis.Zharkov
112af9b145
FIR: Rework bare types support
...
^KT-48305 Fixed
2021-08-30 16:24:44 +03:00
Dmitriy Novozhilov
67dd23354c
[FIR] Check compatibility of equality call between IT by component of each type
...
^KT-48113 Fixed
2021-08-30 11:11:50 +03:00