Mikhail Pyltsin
e39d914c56
[java-highlighting] IDEA-357868 Better error message for primitive types in instanceof
...
GitOrigin-RevId: bb638cf01ec27474d89859c27c5410add6be5931
2024-08-22 09:22:53 +00:00
Mikhail Pyltsin
fc86f137ca
[java-inspections] EA-1288620 record deconstruction can be broken in inspections
...
- check that record deconstructions have correct numbers of components
- optimize `unwrapSealedTypes` a bit
GitOrigin-RevId: 167dabb1a5e6dd156e8d5772373c6f059e209257
2024-06-20 17:53:33 +00:00
Mikhail Pyltsin
f27595c831
[java-highlighting] IJ-CR-132825 IDEA-352187 Support JEP 455: highlighting for instanceof with primitives
...
- use `HighlightUtil.checkFeature` for PRIMITIVE_TYPES_IN_PATTERNS
- simplify tests
- add javadocs a bit
GitOrigin-RevId: 61019896534a11e1c7e2f281054d49a32a8ab8e6
2024-05-01 21:37:16 +00:00
Mikhail Pyltsin
45160db0df
[java-highlighting] IDEA-352588 Support JEP 455: highlighting for switch with primitives
...
GitOrigin-RevId: 06636352b202037ec3400b2f9763e101d8ed6042
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
0f5c405185
[java-highlighting] IDEA-352188 Support JEP 455: change error messages for records
...
GitOrigin-RevId: a6e9fe75500155ca9e77514eca8d00f5e4e94e51
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
c8995f3cc8
[java-highlighting] IDEA-352187 Support JEP 455: highlighting for instanceof with primitives
...
GitOrigin-RevId: cbd688d0945b03bffb05af85825c610889383fc4
2024-04-29 21:17:42 +00:00
Bas Leijdekkers
1fd9cf454d
[java] more precise highlighting for "Annotations are not allowed in deconstruction pattern types"
...
GitOrigin-RevId: 689808b6ab80920e12a0b5d55712df066e84a406
2024-04-01 10:52:15 +00:00
Mikhail Pyltsin
8813548cbb
[java-highlighting] IJ-CR-125397 IDEA-344235 support calls with checked exceptions for instanceOf patterns
...
- reimplement, changing only mayCompleteNormallyVisitor
GitOrigin-RevId: 67be02c535ec3d5df7a9ec9cd77395305db27e14
2024-02-13 21:45:04 +00:00
Mikhail Pyltsin
aa94146c31
Revert "[java-highlighting] IDEA-344235 support calls with checked exceptions for instanceOf patterns"
...
This reverts commit 15d80e2f3028bd59c1ec9a73a7a3af4c1c5f1027.
GitOrigin-RevId: a770a8ce645fa6a578d5a923098d39456d7fd379
2024-02-13 21:44:54 +00:00
Tagir Valeev
d0cf7b359a
[java] IDEA-345498 Remove explicit Java 20-preview support and parenthesized patterns
...
GitOrigin-RevId: 8d646035979e3ec0a7de3c6f58a4e6ec9967bdbd
2024-02-12 19:12:36 +00:00
Mikhail Pyltsin
4948c8af8c
[java-highlighting] IDEA-344235 support calls with checked exceptions for instanceOf patterns
...
GitOrigin-RevId: 15d80e2f3028bd59c1ec9a73a7a3af4c1c5f1027
2024-02-05 19:22:52 +00:00
Mikhail Pyltsin
9aa54b1fd4
[java-highlighting] IDEA-340211 Unnamed variables, turn on for java 22 (JEP 456)
...
- turn on for java 22
- add more tests for java 22
GitOrigin-RevId: 62b25e768ef827da94acffc8a9054c6b5775254e
2023-12-08 17:13:29 +00:00
Tagir Valeev
a828a34968
[java-highlighting] Fixes in unnamed variables highlighting (IDEA-323960)
...
1. Highlight C-style arrays
2. Do not highlight variables inside for initializer
3. Highlight variables without initializer
4. Better message for underscore references when unnamed variables are allowed
GitOrigin-RevId: 5bca18969cf8fb0ea6e052b0aef71323bbfa69b5
2023-08-02 21:04:54 +00:00
Tagir Valeev
a41ef84fea
[java] Unnamed variables
...
IDEA-323910 Implement parser for "JEP 443: Unnamed Patterns and Variables (Preview)"
IDEA-323960 Support error highlighting for unnamed variables (JEP 443)
GitOrigin-RevId: 1b9ee424063dfd4d32c2215fc8b0a9838dbdcd95
2023-07-31 13:41:28 +00:00
Tagir Valeev
7933354967
[java-highlighting] UnnamedPatterns exhaustiveness tests fixed (IDEA-326473)
...
GitOrigin-RevId: 046110c4a35093a859b02b17b0c6277d5d48e02b
2023-07-31 10:52:41 +00:00
Tagir Valeev
ab550ac4c0
[java] IDEA-326473 Implement unnamed patterns
...
GitOrigin-RevId: 1b5db700434306be23d07e38905537025e2cc892
2023-07-27 10:03:54 +00:00
Mikhail Pyltsin
0642b99fa9
[java-highlighting] IDEA-324313 IJ-CR-110221 Annotations are not allowed in deconstruction types
...
GitOrigin-RevId: 051a4bc7c874a5521e139fa2b5b88092ada26347
2023-07-08 13:44:44 +00:00
Mikhail Pyltsin
cc3044554e
[java-highlighting] IDEA-324313 Annotations are not allowed in deconstruction types
...
GitOrigin-RevId: 8541407b1bfd7d7b82d5cc9ceabb0e9ee867285a
2023-07-05 12:09:23 +00:00
Mikhail Pyltsin
4bc43b46f4
[java-highlighting] IDEA-323955 Record patterns support available only for Java 20 preview. Fix compiler errors and tests
...
GitOrigin-RevId: 5f856519e56e61818e95cf63766fb6a54c6283ad
2023-07-05 12:09:22 +00:00
Mikhail Pyltsin
2be6bd8458
[java-highlighting] IDEA-323767 Rename "Downcast compatible" -> "checked cast compatible"
...
GitOrigin-RevId: 6ac91a8fde1cae06a0892847b3ae24db1fdd9d0f
2023-07-05 12:09:16 +00:00
Mikhail Pyltsin
ac1a73d5ee
[java-highlighting] IDEA-323955 Make for record patterns support available only for Java 20 preview
...
GitOrigin-RevId: 564b8a7ff3586a032f048bef8fce18f8da3c0fe8
2023-07-05 12:09:15 +00:00
Andrey Cherkasov
9ccc820db2
[java] Remove Java 17 Preview and Java 18 Preview language levels
...
IDEA-314047
GitOrigin-RevId: 8c24deb2dfb5361f08857d7933ab290476f4ce84
2023-06-19 17:37:05 +00:00
Tagir Valeev
a26a942e47
[java-highlighting] getDeconstructedImplicitPatternType: use captureTopLevelWildcards to fix handling bound type parameters
...
GitOrigin-RevId: 7f0e08e0ad449b451a5dc373003f218981863276
2023-02-07 12:02:10 +00:00
Tagir Valeev
9b9e75531c
[java-highlighting] Fix pattern type inference for wildcard-parameterized patterns
...
Also: fix and unify unchecked warnings for patterns
#IDEA-312000 fixed
GitOrigin-RevId: 8f47b72ec308cc9b089571ddc486d275d5d8ff4e
2023-02-07 12:02:04 +00:00
Andrey Cherkasov
d7ddd45967
[java-highlighting] Record Patterns (Second Preview) in Java: fix false negative of the error Pattern is not exhaustive
...
IDEA-312087
GitOrigin-RevId: 8d7a892726aa233a97a16721a6cea1755465f7c4
2023-02-01 10:44:13 +00:00
Mikhail Pyltsin
e98c32838a
[java-highlighting] IDEA-311833. Not correct warning about unchecked cast
...
GitOrigin-RevId: aec8937d162d2f84c0abf22d50015477427ee602
2023-01-29 23:14:53 +00:00
Mikhail Pyltsin
c90daf9a48
[java-highlighting] IDEA-311786. Support PsiForeachStatementBase for foreach
...
GitOrigin-RevId: 28e81a0452d938d690f58bf95a07aabae7aab452
2023-01-28 15:13:13 +00:00
Andrey Cherkasov
9a9a0e26bf
[java-highlighting] add a few more positive tests for record patterns in 'for-each' loops
...
GitOrigin-RevId: 288695978fe572073256e34ff116381f65f597d7
2023-01-21 21:46:21 +00:00
Andrey Cherkasov
13b5f3d866
[java-highlighting] Record Patterns (Second Preview): remove support for named record patterns
...
IDEA-310052
GitOrigin-RevId: 0128d70c6343a65e44bf14bef7d89aeb94599c71
2023-01-15 05:39:26 +00:00
Andrey Cherkasov
673b365e2a
[java-highlighting] Check applicability of an iteration declaration iff a correspond feature is available
...
GitOrigin-RevId: 17b95eee81d2a3c17231e1d923db9b3db8f23f1f
2023-01-06 19:27:00 +00:00
Andrey Cherkasov
b9c8ca5b1f
[java-highlighting] Move tests
...
GitOrigin-RevId: d2a25443ec1006f7f4381695fc22feeaf4c644d3
2023-01-06 19:26:56 +00:00
Andrey Cherkasov
f884fcde64
[java-highlighting] foreach patterns: applicability and exhaustiveness
...
GitOrigin-RevId: f136201891af221d3ffa9065363da9894bf56e55
2023-01-06 19:26:51 +00:00
Andrey Cherkasov
9e8bae7d62
[resolve] Implement resolve for record patterns in for-each loops (IDEA-308746)
...
GitOrigin-RevId: 9ad6a7b00b10cf78a62166540135b569f69b727e
2022-12-26 13:39:21 +00:00
Andrey Cherkasov
0accb13525
[java-highlighting] Fixes after review
...
IJ-CR-98608
IDEA-304626
GitOrigin-RevId: f201258e8116a5f89cb9c3fbdf6bf018176a35ba
2022-11-16 15:02:42 +00:00
Andrey Cherkasov
3631003713
[java] Fix highlighting for generic record patterns
...
IDEA-304626
GitOrigin-RevId: 178a56e1c9b57b0d19b407170ce891ba9c1f9a3f
2022-11-15 16:50:58 +00:00
Andrey Cherkasov
2b7e0f0708
[java-highlighting] Incorrect number of nested patterns: provide quick-fixes if it is possible
...
IDEA-298829
GitOrigin-RevId: 7a7da446d502a89ba3040e3558929bd918111de9
2022-11-08 17:52:21 +00:00
Alexandr Suhinin
23b94cab85
IDEA-305107 [java highlighting]: remove html tag from deconstruction error description
...
GitOrigin-RevId: 2cb7a12ca503f1ad21834109b77eecb72d66d280
2022-11-03 19:20:58 +00:00
Andrey.Cherkasov
40a07679bb
IDEA-303240 Resolve for parenthesized patterns
...
GitOrigin-RevId: 7e3cd33ea7abbe2acd8e7821a844df680e0c5a65
2022-10-06 16:21:48 +00:00
Andrey.Cherkasov
64f0fb3cee
[java-highlighting] Allow instanceof pattern on subtype since Java 19 (JEP 427)
...
IDEA-302944
GitOrigin-RevId: e4c44b0694ffb65d02f2415243d08f00a2dea74f
2022-10-03 11:02:13 +00:00
Alexandr Suhinin
db97df0ad1
IDEA-300124: highlight raw deconstruction patterns
...
GitOrigin-RevId: 8c5c34e21d9952a67b880868fe3ac600f058c582
2022-08-24 11:36:18 +00:00
Alexandr Suhinin
ddde6efcca
IDEA-300284: fix pattern resolve state for deconstructions
...
GitOrigin-RevId: e3d5598a857fd24d63a7e9a5b13d14c342ccd886
2022-08-24 11:06:27 +00:00
Alexandr Suhinin
888020ea77
IDEA-298318: report mismatch errors for deconstruction inside instanceOf
...
GitOrigin-RevId: 591cf3577babf47512e1fbc5bb70b182aa0c08ce
2022-07-21 11:31:55 +00:00
Tagir Valeev
84b450fbdc
[java-highlighting] Avoid wrong error message when if statement is directly inside the switch
...
IDEA-295898 Good code red. 'Patterns in switch are not supported at language level '18''
GitOrigin-RevId: 5efad2270e30c237a9906c6f29950dc9980b7e1d
2022-06-15 19:18:27 +00:00
Ilyas Selimov
fee12f1d34
java - moved some tests as they belong rather to highlighting than to DFA
...
GitOrigin-RevId: af470efb050d162026ef7a492d60f912fca655e2
2021-11-08 10:22:21 +00:00
Nikita Eshkeev
cbb421ecb6
[java][instanceof] IDEA-280626 Patterns in instanceof: red code false-negative
...
Move the test data to LightPatternsHighlightingTest
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: f62fc31839e92b03161837d92b2518c4b13ab5c8
2021-10-27 10:47:22 +00:00
Anna Kozlova
f55ce0722f
remove Java 15 Preview language level (IDEA-273436)
...
GitOrigin-RevId: efe6feafd81a99bde15e892530c1085fc4fb8772
2021-08-31 06:25:32 +00:00
Tagir Valeev
0a1276cbe2
[java-highlighting] InstanceOfNameConflicts: new test
...
GitOrigin-RevId: c766833dd6ff293c807838ccf94fe9a416361206
2021-01-29 09:00:12 +00:00
Tagir Valeev
e8baf732eb
[java-highlighting] Expression type is a subtype message fixed; added equals message
...
Review ID: IJ-CR-5352
GitOrigin-RevId: 16674439ea3998cceb4faf0326e53ac2de30d7b6
2021-01-28 05:40:26 +00:00
Tagir Valeev
6fe2638869
[java] IDEA-257411 Update pattern matching for instanceof support for Java 16
...
1. Do not report error if non-final variable is reassigned
2. Report error in Java 15 if 'final' modifier is used
3. Allow specifying 'final' modifier on introduce variable
4. Support non-final variables in PatternVariableCanBeUsed inspection
5. Copy modifiers in PatternVariableCanBeUsed quick-fix
GitOrigin-RevId: d7b82261a018c9a48bcdcf237ade0d8c08f5978d
2021-01-26 05:55:43 +00:00
Tagir Valeev
e8ee29f264
[java-highlighting] Support local variable annotations on pattern variables (IDEA-257411, JEP 394)
...
GitOrigin-RevId: 67130333b1cf306896c2cdae672ff2f0d40f3977
2021-01-26 05:14:02 +00:00