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
Mikhail Glukhikh
c641fa739b
FIR: provide 'replaceSource' only for FirQualifiedAccess inheritors
2021-03-15 15:33:38 +03:00
Dmitriy Novozhilov
e00ff5c473
[FIR] Make FirClassifierSymbol sealed
2021-03-15 12:13:09 +03:00
Ilya Kirillov
ded234074d
FIR: render value parameter/lambda/accessor resolve phase if RenderMode.renderDeclarationResolvePhase is enabled
2021-03-12 11:43:59 +01:00
Tianyu Geng
9476175cc2
FIR: add mapping to partially resolved arg list
...
Initially I tried adding `mapping` field to `FirArgumentList` but it
seems to be very difficult to make it flexible enough to do what I want.
So instead, I am creating a `FirPartialResolvedArgumentList`, which
seems to be very simple.
2021-03-11 22:57:58 +03:00
Alexander Likhachev
faf9600ff0
[Build] Fix configuration cache issues (part 2)
...
* Make WriteCopyrightToFile task compatible with configuration cache
* Configure shadowJar task in compatible with configuration cache way
* Configure compileJava9Java task in compatible with configuration cache way
* Make :js:js.tests buildscript compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:33 +03:00
Jinseong Jeon
d348e58183
FIR: rename util to retrieve primary constructor
2021-03-04 17:56:30 +03:00
Jinseong Jeon
1090eca086
RAW FIR: record property accessors' own modality properly
2021-03-04 17:56:30 +03:00
Jinseong Jeon
e009b71f88
FIR checker: report uninitialized member/extension properties
2021-03-04 17:56:29 +03:00
Dmitriy Novozhilov
714c2a8f93
[FIR] Bind return expression to function symbol instead of function itself
2021-03-02 19:11:27 +03:00
Dmitriy Novozhilov
1fac1fc5d3
[FIR] Add proper rendering of FirJavaTypeRef
2021-03-02 19:11:19 +03:00
Dmitriy Novozhilov
523d37b0f5
[Test] Implement handler which dumps overrides tree of specified classes
2021-03-02 19:11:14 +03:00
Dmitriy Novozhilov
4299794de2
Move SmartPrinter to :core:compiler.common
2021-03-02 19:11:10 +03:00
Tianyu Geng
17617ffd3f
IDE FIR: fix resolving vararg parameter type
...
For a vararg parameter type, there corresponding FIR element has a fake
source of kind ArrayTypeFromVarargParameter. As a result,
`getOrBuildFir` returns the whole `FirValueParameter` for the parameter
type reference. Therefore, we need some special handling for this case
in order to resolve the proper `KtSymbol`.
2021-03-02 12:46:55 +01:00
Mikhail Glukhikh
b138b166e3
FIR: use EQUALS & TO_STRING from OperatorNameConventions
2021-02-26 13:50:26 +03:00
Jinseong Jeon
e6cfd5d06f
FIR: move data class synthetic members' names
2021-02-26 13:50:25 +03:00
Jinseong Jeon
856838f82c
FIR: refactor delegate unwrapping
...
Not implemented override checker will use those to pretend to make
delegeted members (before checking similarly pretended fake overrides)
2021-02-26 13:50:24 +03:00
Ilmir Usmanov
d67e4f0c48
Rename inline class -> @JvmInline value class in stdlib and compiler
2021-02-25 16:06:51 +01:00
Ilya Kirillov
f4371c670e
Move WhenMissingCase from fir module to compiler.common to use in IDE
2021-02-24 20:13:42 +01:00
Ilya Kirillov
83f8650e80
Move CallableId from fir module to compiler.common to use in IDE
2021-02-24 20:13:41 +01:00
Denis.Zharkov
45018ea468
FIR: Rework loading overrides of special built-in methods from Java
...
Some of the changed data is correct, but some diagnostics are incorrect
Corner cases like having both contains(Object) and contains(String)
within implementation of Collection<String> is not supported
2021-02-20 10:59:21 +03:00
Denis.Zharkov
4b0aeb7105
FIR2IR: Support initialSignatureDescriptor
...
It will be used for overrides of renamed special built-ins during signature mapping
to obtain initial signature
2021-02-20 10:59:21 +03:00
Denis.Zharkov
23705a269f
FIR: Fix supertype scopes for local classes
...
Do not use ClassId as it can't be a key for local classes
2021-02-20 10:59:21 +03:00
Denis.Zharkov
3e420ca4e3
FIR: Introduce FirDeclarationOrigin.BuiltIns
2021-02-20 10:59:21 +03:00
Mikhail Glukhikh
742f1e0069
FIR: add replaceSource to all FIR tree nodes
2021-02-19 18:24:45 +03:00
Roman Golyshev
74bdb2398e
FIR: Get rid of PSI dependency in the :fir:resolve module
2021-02-19 07:20:06 +00:00
Mikhail Glukhikh
8bab208322
FIR2IR: use information about callable reference adaptation from resolve
2021-02-15 17:08:08 +03:00
Dmitriy Novozhilov
0c4bca4bde
[FIR] Fix warnings in FIR modules and enable -Werror in them
2021-02-12 14:50:46 +03:00
Dmitriy Novozhilov
0e31551797
[FIR] Generate _ instead of value for unused setters in FIR builders
2021-02-12 14:50:45 +03:00
Roman Golyshev
88e7d1e5ee
FIR: Attach candidate symbol to the ErrorNamedReference
...
This allows to restore the referenced candidate in cases when there are
no ambiguity
Also, change rendering of named references to be more accurate, so the
diagnostics tests pass: if reference is FirErrorNamedReference, it is
more important than if it has a not-null `candidateSymbol`
2021-02-12 10:53:15 +00:00
Alexander Udalov
3dfd2a95fa
Minor, do not output "Not changed" for generated FIR checkers on each build
2021-02-10 12:04:40 +01:00
Jinseong Jeon
bd37badf29
FIR checker: add diagnostics for backing fields
2021-02-10 12:29:34 +03:00
Ilya Kirillov
c54354f348
FIR: fix memory leak from ConeIntegerLiteralTypeImpl via static NUMBER_TYPE
...
ConeClassLikeType has a cachedExpanded type which has a strong ref to FirSession
2021-02-09 17:15:46 +01:00
Ilya Kirillov
5cefad1ab3
FIR: use GeneratorsFileUtil for checkers-component-generator
2021-02-09 17:15:38 +01:00
Ilya Kirillov
b92dce9be4
FIR: introduce DSL to generate diagnostics list
...
this is needed to generate diagnostic list for IDE
2021-02-09 17:14:22 +01:00