Mikhail Glukhikh
295858cf5c
Rename FIR diagnostic to METHOD_OF_ANY_IMPLEMENTED_IN_INTERFACE
2021-03-26 17:06:00 +03:00
Jinseong Jeon
bfc7eb7bab
FIR checker: fix REFERENCE_BY_QUALIFIED positioning strategy to consider callable reference
2021-03-26 15:19:10 +03:00
Jinseong Jeon
8d8ed4cc18
FIR checker: check if callable reference targets are allowed members
2021-03-26 15:19:10 +03:00
Tianyu Geng
6769ce0e2b
FIR checker: check TOPLEVEL_TYPEALIASES_ONLY
2021-03-26 15:19:10 +03:00
Mikhail Glukhikh
648bf99842
FIR: temporarily drop parent manipulation code around super type entries
2021-03-26 13:05:42 +03:00
Victor Petukhov
731e3ebae1
Rename LV ImprovementsAroundTypeEnhancement into TypeEnhancementImprovementsInStrictMode
2021-03-26 11:03:49 +03:00
Ilya Chernikov
51a1cec08b
FIR: Reimplement conflicts checker to detect conflicts in different files
...
also pass correct ScopeSession to checkers
fixes some IC tests
2021-03-24 21:24:19 +01:00
Tianyu Geng
56bec6997c
FIR checker: report SUPERTYPE_NOT_INITIALIZED
...
Combined this and the checker of
SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR together.
Also fixed SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR incorrectly
repoted as warning instead of error.
2021-03-24 17:48:39 +03:00
Tianyu Geng
e1c80ac75c
FIR checker: introduce NO_(GET|SET)_METHOD
...
Besides introducing new diagnostics, this commit unifies source usages
for array accesses in PSI & LT.
2021-03-24 16:25:01 +03:00
Mikhail Glukhikh
449a79151a
FirNotImplementedOverrideChecker: check also anonymous objects / enums
2021-03-24 16:07:30 +03:00
Mikhail Glukhikh
82b8cc333e
FIR: introduce INVISIBLE_ABSTRACT_MEMBER_FROM_SUPER
2021-03-24 16:07:28 +03:00
Mikhail Glukhikh
47d2a914bc
FIR: add bad test data changes related to not implemented checker
2021-03-24 16:07:26 +03:00
Mikhail Glukhikh
9ce8420491
FIR: introduce not implemented checker
2021-03-24 16:07:25 +03:00
Mikhail Glukhikh
a26a195c35
Add FIR_IDENTICAL to some tests
2021-03-24 16:02:09 +03:00
Jinseong Jeon
c6298398ef
FIR checker: rework VAL_REASSIGNMENT_VIA_BACKING_FIELD(_ERROR)
2021-03-24 16:02:08 +03:00
Victor Petukhov
7a66e22bb2
Implement top-down completion for nested builder inference calls
...
^KT-42742 Fixed
2021-03-24 15:57:36 +03:00
Dmitriy Novozhilov
de03124f50
[FIR] Fix reporting EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR warning
2021-03-24 12:56:14 +03:00
Ilmir Usmanov
9c97f1ce35
Allow Result return type and nullability operators on Result type
...
by default
2021-03-22 14:56:16 +00:00
Br0mm
75e4c74256
[FIR] Add FirConstValWithGetterOrDelegateChecker
2021-03-22 15:05:40 +03:00
Ilmir Usmanov
3bcc2fe476
Minor. Add IDE MPP test
2021-03-22 11:13:14 +00:00
Ilmir Usmanov
164e9034d1
IC MPP: Allow expect value classes without @JvmInline
...
#KT-45525 Fixed
2021-03-22 11:13:13 +00:00
Victor Petukhov
a2b1aa753b
Substitute captured types with type variables properly
...
^KT-44687 Fixed
2021-03-19 16:16:09 +03:00
Jinseong Jeon
93289aa899
FIR checker: report VAL_REASSIGNMENT_VIA_BACKING_FIELD(_ERROR)
2021-03-17 15:04:44 +03: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
315047b164
FIR checker: Make FirJvmExternalDeclarationChecker a
...
FirMemberDeclarationChecker.
Set isExternal in status for FirRegularClass. Invoke member declaration
checkers for FirRegularClass.
2021-03-17 10:45:26 +01:00
Mark Punzalan
c3d2ce0c1f
FIR checker/IDE: Add checker and quickfix for WRONG_MODIFIER_TARGET.
...
There are only simple checks for `external` and `const` for now. The
rest of the checks (see ModifiersChecker in FE1.0) will be added later.
2021-03-17 10:45:26 +01:00
Ilmir Usmanov
a90a5f6dd4
Check for backend when checking for suspend in fun interfaces
2021-03-16 22:37:44 +01:00
Jinseong Jeon
4c08d10cce
FIR checker: report expression of nullable type parameter as LHS of class literals
2021-03-16 21:56:10 +03:00
Jinseong Jeon
7fff4108b6
FIR checker: report KClass with incorrect type argument
2021-03-16 21:56:10 +03:00
Jinseong Jeon
bc2228d434
FIR checker: don't report errors on type parameter as LHS of class literals
...
If a type paramter is not reified or nullable, different errors will
be reported by FirGetClassCallChecker.
When determining whether type parameter wrapped in qualified access is a
standalone expression or not, we examine whether the checker context has
other qualified accesses in stack. Class literals (::class) is desugared
to FirGetClassCall, and thus not stacked as qualified access. Since
class literals are a special type of callable reference (a subtype of
qualified access), we should keep track of FirGetClassCall in a similar
way.
2021-03-16 21:56:09 +03:00
Jinseong Jeon
e29b40b07f
FIR checker: report TYPE_PARAMETER_AS_REIFIED
2021-03-16 21:56:09 +03:00
Jinseong Jeon
5ba5b63dee
FIR checker: report nullable expression as LHS of class literals
2021-03-16 21:56:09 +03:00
Jinseong Jeon
33c5b49632
FIR checker: report non-typed LHS of callable references
2021-03-16 21:56:08 +03:00
Jinseong Jeon
922419efb8
FIR CFG: route to exit of try main for throw in try main
...
to make the remaining part of try main marked as dead.
^KT-45475 Fixed
2021-03-16 15:11:56 +03:00
Jinseong Jeon
7e5b562b33
Reproduce KT-45475: no smartcast after conditional throw in try expression
2021-03-16 15:11:53 +03:00
Dmitriy Novozhilov
cef859fced
Fix exponential pseudocode size on incorrect prefix increments and decrements
...
#KT-44153 Fixed
2021-03-16 12:25:23 +03:00
Jinseong Jeon
8dce6f2ac9
FIR CFG: don't propagate deadness on the uncaught exception path
2021-03-15 15:54:22 +03:00
Jinseong Jeon
d27ecca0e9
FIR CFA: keep UncaughtExceptionPath separated
2021-03-15 15:54:21 +03:00
Mikhail Glukhikh
c641fa739b
FIR: provide 'replaceSource' only for FirQualifiedAccess inheritors
2021-03-15 15:33:38 +03:00
Dmitriy Novozhilov
631b771251
[FIR] Report proper resolution diagnostics from arguments checks
2021-03-15 12:13:08 +03:00
Dmitriy Novozhilov
6cc3fff48d
[FIR] Properly handle that type variable is contained in inv or contravar positions
...
#KT-45344 Fixed
2021-03-15 12:13:07 +03:00
Ilmir Usmanov
64abb2501f
Minor. Add FIR_IDENTICAL directive
2021-03-15 06:19:22 +01:00
Mikhail Bogdanov
95654bb9bc
Deprecate @JvmDefault
...
#KT-40392 Fixed
(cherry picked from commit c11f38688e )
2021-03-13 08:24:17 +00:00
Ilmir Usmanov
d3b42709fd
Revert "Value Classes: Forbid var properties with value class receivers"
...
This reverts commit f43899086a .
2021-03-12 17:51:24 +01:00
Victor Petukhov
91d2f32a57
Don't lose upper non-expected type constraints to include them to intersection type during finding the result type of the fixing type variable
2021-03-12 14:36:54 +03:00
Victor Petukhov
b87c2a15b5
Don't stop constraints processing if all type variables have proper equality constraints
...
Those type variable may have other constraints after incorporation into which, the constraint error may appear
^KT-42042 Fixed
2021-03-12 14:36:54 +03:00
Victor Petukhov
7f7bb70596
Don't fix a type variable into the intersection type if there is an explicit expected type
...
^KT-43303 Fixed
^KT-42396 Fixed
^KT-42472 Fixed
2021-03-12 14:36:53 +03:00
pyos
e06bacafad
JVM: fix inline cycle detection
...
1. use the correct descriptor in the old backend;
2. clear the temporary variables for arguments in the IR backend.
#KT-45292 Fixed
2021-03-12 11:49:42 +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
Tianyu Geng
be0dd84a06
FIR: check NAMED_ARGUMENTS_NOT_ALLOWED
...
The check has already been partially implemented in
org.jetbrains.kotlin.fir.resolve.calls.FirCallArgumentsProcessor. This
change completes the missing piece that determines if a `FirFunction`
has stable parameter names.
2021-03-11 22:57:57 +03:00