Tianyu Geng
b5caa658d6
FIR: introduce delegate diagnostics
...
This commit adds diagnostics for the following
* DELEGATE_SPECIAL_FUNCTION_MISSING
* DELEGATE_SPECIAL_FUNCTION_AMBIGUITY
* DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE
2021-04-19 15:11:16 +03:00
Mikhail Glukhikh
9894b97058
FIR: rename EXPRESSION_REQUIRED to EXPRESSION_EXPECTED
2021-04-19 15:09:50 +03:00
Ivan Kochurkin
4353365968
[FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests
2021-04-19 12:46:08 +03:00
Mikhail Glukhikh
51d348d5fa
FIR: report FUN_INTERFACE_CONSTRUCTOR_REFERENCE on deserialized properly
...
This fixes KT-46100 for FIR
2021-04-15 15:54:18 +03:00
Ilya Kirillov
d7e3c65c45
FIR: add renderDeclarationOrigin to FirRender
2021-04-15 15:24:02 +03:00
Ilya Kirillov
5de4c5fc28
FIR: allow declaring specific set of parameters for FirRenderer
2021-04-15 15:24:00 +03:00
Ilya Kirillov
0cf00d0f72
FIR: fix FirDefaultPropertyAccessor phase to BODY_RESOLVE
2021-04-15 15:23:56 +03:00
pyos
474d1d48f7
FIR: allow fun T.() = ... as an instance of (T) -> ...
...
It was already done by the previous commit by mistake, but it broke if
there are other value parameters because the type of the first parameter
would be inferred to be same as the type of the receiver.
2021-04-15 14:59:29 +03:00
Dmitriy Novozhilov
7c6a9aa963
[FIR] Store cachedExpandedType in WeakPair instead of usual Pair
...
WeakPair is a renamed OneElementWeakMap
2021-04-15 10:30:29 +03:00
Mark Punzalan
21a3a14289
FIR: Use intersection of all upper bounds for parameterized types in
...
ConeKotlinType.canBeNull.
^KT-45903 In progress
2021-04-14 19:17:10 +03:00
Ilya Kirillov
0051451ed7
FIR: add error message when FirBasedSymbol.fir is not initialized
2021-04-14 18:37:35 +03:00
Dmitriy Novozhilov
0b2943d34c
Prohibit using annotations without TYPE target in several type positions
...
#KT-8325 Fixed
#KT-19455 Fixed
#KT-25876 Fixed
#KT-28449 Fixed
2021-04-14 18:30:54 +03:00
Ilya Chernikov
34694cbec5
FIR: get rid of transformSingle in the generated code
...
further reduce of the callstack depth
2021-04-13 16:18:40 +02:00
Ilya Chernikov
9d557c8b79
FIR: reduce visitor/transformer indirection
...
performance: do not route transform calls via
visitors, reduce call stack depth on transformations
2021-04-13 16:18:40 +02:00
Ilya Chernikov
dfd5e80ce9
FIR: Get rid of CompositeTransformResult
2021-04-13 16:18:39 +02:00
Ivan Kochurkin
964bba3530
[FIR] Implement FLOAT_LITERAL_OUT_OF_RANGE diagnostics, fix tests
2021-04-13 16:22:06 +03:00
Ivan Kochurkin
4cf30cd1fa
[FIR] Implement INT_LITERAL_OUT_OF_RANGE diagnostics, fix tests
2021-04-13 16:22:05 +03:00
Ivan Kochurkin
fb06da2d75
[FIR] Implement WRONG_LONG_SUFFIX diagnostics, fix tests
2021-04-13 16:22:03 +03:00
Andrey Zinovyev
47407c4445
[FIR] Add NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER check
2021-04-11 16:18:07 +00:00
Mikhail Glukhikh
e2cc0510de
Rewrite FirDeclarationDataRegistry.data to avoid type parameter problems
2021-04-09 07:56:35 +03:00
Mikhail Glukhikh
0c17ce2f44
Suppress DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER in code
2021-04-09 07:56:35 +03:00
Nikolay Krasko
14ead33db6
Add teamcity problems when generating files instead of exception
2021-04-08 18:51:10 +03:00
Abduqodiri Qurbonzoda
40d1849f33
Migrate compiler, idea and others to new case conversion api
2021-04-08 03:22:02 +03:00
Ilya Gorbunov
e450a6494a
Migrate deprecations in core, compiler, idea, tests
...
Replacing deprecated Char.toInt() with Char.code and
Number.toChar() with Number.toInt().toChar(), where Number is not Int.
KT-23451
2021-04-07 18:30:20 +03:00
Igor Yakovlev
ea8858e694
[FIR] Add contaning class lookup element for local FirRegular classes
2021-04-07 11:25:22 +02:00
Igor Yakovlev
d05ef3a635
[FIR] Move standard class id's into common module
2021-04-07 11:25:21 +02:00
Ivan Kochurkin
404c69ded7
[FIR] Implement INCORRECT_CHARACTER_LITERAL, EMPTY_CHARACTER_LITERAL, TOO_MANY_CHARACTERS_IN_CHARACTER_LITERAL, ILLEGAL_ESCAPE, ILLEGAL_ESCAPE_SEQUENCE diagnostics, fix tests
2021-04-06 20:44:32 +03:00
Dmitriy Novozhilov
3ef87d0265
[FIR] Add effective visibility to resolved status
...
This commit includes:
- introduce FirResolvedDeclarationStatus.effectiveVisibility
- replace FirEffectiveVisibility with EffectiveVisibility
- move calculation of effective visibility from FirEffectiveVisibilityResolver
(which is deleted) to FirStatusResolver and FirDeserializer
2021-04-06 12:30:46 +03:00
Dmitriy Novozhilov
66668b2294
[FIR] Support resolve of local typealiases
2021-04-06 12:30:42 +03:00
Dmitriy Novozhilov
5ebd24eac5
[FIR] Save inline status of lambda after resolution
2021-04-06 12:30:34 +03:00
Ilya Kirillov
5ceec858aa
FIR IDE: do not search for sealed class inheritors on every class resolve
2021-04-02 17:15:30 +02:00
Mikhail Glukhikh
e7102cd63f
FIR: fix FQ_NAMES_IN_TYPES renderer
2021-04-02 15:11:02 +03:00
Mikhail Glukhikh
566dc434cc
FIR: introduce MANY_*_MEMBER_NOT_IMPLEMENTED diagnostic
2021-04-02 10:24:20 +03:00
Jinseong Jeon
bb242f022f
FIR renderer: avoid StackOverflow when rendering loop jump condition
...
For example,
```
do {
...
} while(
when (...) {
... -> break
}
)
```
That `break` condition is `when` expression, and while visiting its
branch result, we will see the same `break` again.
2021-04-01 20:07:52 +03:00
Denis.Zharkov
1f074326bf
FIR: Fix Java scope in case of accessor with getter signature from supertype
...
^KT-45584 Fixed
2021-03-31 15:57:02 +03:00
Ivan Kylchik
13d8b10be0
Extract some cone type utils properties to reuse them in visualizer
2021-03-29 18:11:13 +03:00
Tianyu Geng
ae902e6fe5
FIR: fix source of callee reference in delegated constructor call
...
Previously the callee reference of a delegated constructor call is
always the same as the call itself. This violates the contract that no
two FIR elements can have identical sources. In addition, this sets the
entire call expression as the source of the callee expression.
This change instead sets the proper constructor ref as the callee.
Also fixed EXPLICIT_DELEGATION_CALL_REQUIRED type. It should be an error
instead of a warning.
2021-03-29 12:45:27 +03:00
Mikhail Glukhikh
221b6bd184
Drop usages of FirErrors.TYPE_PARAMETER_AS_SUPERTYPE
2021-03-26 17:05:57 +03:00
Ilya Chernikov
20fdad87ec
FIR: support direct use of typealias with friend-paths
...
also fixes one IC test
2021-03-24 21:24:19 +01:00
Ilya Chernikov
f8d50d585d
FIR: Implement lookup tracking
2021-03-24 21:24:18 +01:00
Ilya Chernikov
ed78183dbd
FIR: use more specific cone error for unresolved user type ref
...
replaces diagnostic with <No name> with specific qualifier
2021-03-24 21:24:18 +01:00
Dmitriy Novozhilov
de03124f50
[FIR] Fix reporting EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR warning
2021-03-24 12:56:14 +03:00
Dmitriy Novozhilov
094287741c
[FIR] Add FirSourceElement.text extension for debug purposes
2021-03-24 12:56:13 +03:00
Ilya Kirillov
dcf64779a9
FIR: add declaration attributes checking to rawFirBuilder/lightTree tests
2021-03-22 12:30:58 +01:00
Ilya Kirillov
010f1cb634
FIR IDE: build KtJavaFieldSymbol only for Java fields
2021-03-22 11:27:22 +01:00
Tianyu Geng
94de193993
FIR: introduce VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION check
...
Besides adding VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION,
we remove here NO_TYPE_FOR_TYPE_PARAMETER since it doesn't exist in FE1.0.
The name also doesn't make much sense.
From the usage it looks like it should have been
VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION instead.
2021-03-17 15:04:43 +03:00
Mark Punzalan
10d16d10d5
Raw FIR: Fix downward propagation of external and inline from
...
property to default accessors for light-tree.
2021-03-17 10:45:26 +01:00
Denis.Zharkov
c09fe3ea6f
FIR: Optimize unnecessary interface casts by adding relevant overload
2021-03-16 09:28:52 +03:00
Mikhail Glukhikh
06a80c0b34
FIR tree generator: merge fields from parents properly
2021-03-15 15:33:38 +03:00
Mikhail Glukhikh
7f7a964b2e
FIR: annotate 'replaceSource' with '@FirImplementationDetail'
2021-03-15 15:33:38 +03:00