Andrey Zinovyev
bf845b6066
[FIR] Add JVM_RECORD_NOT_VAL_PARAMETER diagnostic
2021-08-23 10:33:21 +00:00
Andrey Zinovyev
e8405c41d1
[FIR] Report UNSUPPORTED_FEATURE if jvm records feature is not enabled
2021-08-23 10:33:21 +00:00
Andrey Zinovyev
c7008892fd
[FIR] Add NON_DATA_CLASS_JVM_RECORD diagnostic
2021-08-23 10:33:21 +00:00
Andrey Zinovyev
84f5d6b149
[FIR] Add JVM_RECORD_WITHOUT_PRIMARY_CONSTRUCTOR_PARAMETERS diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
3fee87a0f3
[FIR] Add ENUM_JVM_RECORD diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
c8381e9b0f
[FIR] Add NON_FINAL_JVM_RECORD diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
6b70aecad5
[FIR] Add LOCAL_JVM_RECORD diagnostic
2021-08-23 10:33:19 +00:00
Victor Petukhov
bf1e68a53f
Resolve calls using the builder inference despite the presence of the annotation if there are uninferred type variables
...
^KT-48194 Fixed
2021-08-20 01:28:11 +03:00
Victor Petukhov
55811c8851
Don't use builder inference if possible
...
The builder inference is running only if there are still uninferred type variables
^KT-48193 Fixed
2021-08-20 01:28:10 +03:00
Andrey Zinovyev
3b21759697
[FIR] SUPER_CALL_WITH_DEFAULT_PARAMETERS diagnostic
2021-08-19 15:25:50 +03:00
Andrey Zinovyev
24fbe0f072
[FIR] UPPER_BOUND_CANNOT_BE_ARRAY diagnostic
2021-08-19 15:25:49 +03:00
Andrey Zinovyev
4661656b8c
[FIR] JVM_PACKAGE_NAME* diagnostics
2021-08-19 15:25:47 +03:00
Andrey Zinovyev
ae558c0290
[FIR] Add DEPRECATED_JAVA_ANNOTATION diagnostic
2021-08-19 15:25:46 +03:00
Andrey Zinovyev
f9b601edae
[FIR] @JvmOverloads related checkers
2021-08-19 15:25:44 +03:00
Andrey Zinovyev
17ae69416c
[FIR] Add SYNCHRONIZED_* diagnostics
2021-08-19 15:25:43 +03:00
Andrey Zinovyev
7ba8e0d9cc
[FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic
2021-08-19 15:25:43 +03:00
Andrey Zinovyev
f90b534c4c
[FIR] Add STRICTFP_ON_CLASS diagnostic
2021-08-19 15:25:41 +03:00
pyos
47d0211370
FE: do not enhance ? in jspecify NullMarked scope
...
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.
#KT-48262 Fixed
2021-08-18 16:41:00 +03:00
Andrey Zinovyev
1cd321a90f
[FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic
2021-08-18 16:03:01 +03:00
Tianyu Geng
fb1eac0985
FIR: report SMARTCAST_IMPOSSIBLE on inherited alien properties [KT-48101]
2021-08-18 12:02:02 +03:00
Denis.Zharkov
753ba99b04
FIR: Support enhanced types when checking if Java type is primitive
2021-08-17 21:38:01 +03:00
Denis.Zharkov
c3a327e118
FIR: Fix ambiguity on Int2IntMap in IC
2021-08-17 21:38:01 +03:00
Andrey Zinovyev
ab158a53c3
[FIR] ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_ANNOTATION diag
2021-08-17 16:05:42 +03:00
Andrey Zinovyev
1cdbbad367
[FIR] ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION diag
2021-08-17 16:05:42 +03:00
Andrey Zinovyev
a17a61341b
[FIR] Fix false positive NON_INTERNAL_PUBLISHED_API on constructor val
...
#KT-48234 Fixed
2021-08-16 19:12:31 +03:00
Tianyu Geng
b77dc4136b
FIR checker: fix JAVA_TYPE_MISMATCH again
2021-08-16 16:54:22 +03:00
Tianyu Geng
64ebddcbc6
FIR checker: add convention check for ++ and +=, etc
2021-08-16 15:14:30 +03:00
Ivan Kochurkin
2c1c24c042
[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
2021-08-13 18:32:28 +03:00
Ivan Kochurkin
cd6384eb20
[FIR] Fix handling of WRONG_MODIFIER_TARGET
...
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Ivan Kochurkin
e85940a1ac
Unbind modifiers checks from psi
...
Use common code in FE and FIR in modifier checker, refactor
2021-08-13 18:32:26 +03:00
Mikhail Glukhikh
4e4d36f85a
FIR: take lower priority into account during references EagerResolve
...
#KT-48158 Fixed
2021-08-13 11:14:04 +03:00
Mikhail Glukhikh
a21d281c19
FIR: fix capturing on intersection types #KT-48109 Fixed
2021-08-13 11:14:03 +03:00
Mikhail Glukhikh
a04913a197
FIR: use captureFromTypeParameterUpperBoundIfNeeded for argument types
...
#KT-48161 Fixed
2021-08-13 11:14:02 +03:00
Tianyu Geng
1679da45ab
FIR checker: COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT
...
FIR simply ignores anything after the first comma if the when expression
doesn't have a subject. Hence, the checker has to rely on PSI structure
instead.
2021-08-12 18:42:26 +03:00
Mikhail Glukhikh
dd3eb53904
Drop forgotten foreign annotation test data
2021-08-12 14:25:18 +03:00
Andrey Zinovyev
1338675833
[FIR] Fix while's label, when condition has lambda
...
#KT-48116 Fixed
2021-08-12 10:20:45 +03:00
Andrey Zinovyev
3ec9599bc4
[FIR][CFG] Partial support of postponed Nothing calls
...
In try blocks, last call won't be completed when building node for it
This is workaround to partially reconstruct nothing stub node for such
calls. Should work for non-local returns in try only.
#KT-48160 Fixed
2021-08-11 21:57:14 +03:00
Ivan Kochurkin
445e5122c1
[FIR] Fix conversion of underscored value parameters in functions
...
Fix false REDECLARATION
2021-08-11 21:52:46 +03:00
pyos
623b289616
Regenerate foreign annotation test data for FIR
2021-08-11 15:58:02 +03:00
Tianyu Geng
06ee84f809
FIR checker: report AMBIGUOUS_SUPER
2021-08-10 19:36:44 +03:00
Tianyu Geng
280c445783
FIR checker: check super reference
...
This change touches the following diagnostics to make them behave closer
to FE1.0
* SUPER_NOT_AVAILABLE
* SUPER_IS_NOT_AN_EXPRESSION
* INSTANCE_ACCESS_BEFORE_SUPER_CALL
* NOT_A_SUPERTYPE
Other than tweaking the diagnostics, this change also alters resolution
by consider marking `super` with mismatched type parameter as
errorenous. As a result, the following code no longer resolves.
```
class A: B() {
fun test() {
super<String>.length
// ^^^^^^ FIR currently resolves this to `String.length`.
// With this change, `length` becomes unresolved
// instead
}
}
```
Also, now we report `UNRESOLVED_LABEL` on unresolved label on `super`
reference, though FE1.0 reports `UNRESOLVED_REFERENCE`.
All the errors above are reported as ConeDiagnostics and hence some
checkers are deleted.
In addition, it also suppresses more downstream (mostly unresolved)
errors if the receiver has errors. FE1.0 doesn't do it for all the cases
we have here. But it seems nicer to reduce these "redundant" unresolved
errors.
2021-08-10 19:36:43 +03:00
Tianyu Geng
bcf6202863
FIR checker: fix position strategy for UNRESOLVED_LABEL
2021-08-10 19:36:04 +03:00
Ivan Kochurkin
2ca3adbcb2
[FIR] Throw REDECLARATION for duplicated type parameters in declarations
2021-08-10 15:09:27 +00:00
Ivan Kochurkin
c19598c2fc
[FIR] Throw REDECLARATION for duplicated enum entries
2021-08-10 15:09:26 +00:00
Ivan Kochurkin
9736cc162b
[FIR] Throw REDECLARATION for duplicated value parameters in function
...
Add new test file
2021-08-10 15:09:26 +00:00
Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Mikhail Glukhikh
512a851c65
Minor fix of test data for consistency with FIR
2021-08-10 13:19:26 +03:00
Mikhail Glukhikh
85a2a3255d
Add new SENSELESS_COMPARISON in FIR foreign annotation tests
2021-08-10 13:19:26 +03:00
pyos
cdc0f36859
Permit silencing FIR tests with results depending on configuration
2021-08-10 13:19:25 +03:00
pyos
33251f6d50
Generate foreign annotation test data for FIR
2021-08-10 13:19:23 +03:00