diff options
author | Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> | 2024-06-09 19:39:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-09 18:39:52 +0200 |
commit | d6b4afb636aed7eaf709eb27c4944a1263a0f887 (patch) | |
tree | 1e516d3cf250a9ae1e29678fd2057793091f4222 /runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump | |
parent | 477402ecf99b09087c2517398f05e02f082ef192 (diff) |
runtime(java): Exclude lambda expressions from _when_ _switch-case_ label clauses (#14945)
These guard clauses are always boolean expressions, whereas
lambda expressions can only appear in either an assignment,
a casting, or an invocation context.
References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11.1
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.27
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump')
-rw-r--r-- | runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump b/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump new file mode 100644 index 0000000000..1def6c27b7 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|c+0#af5f00255&|a|s|e| +0#0000000&|L|e|t@1|e|r|s| |a|l|p|h|a| |w+0#af5f00255&|h|e|n| +0#0000000&|L|e|t@1|e|r|s|.|A|L|P|H|A| |=@1| |a|l|p|h|a| @16 +@24|-|>| |a|l|p|h|a|;| @41 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|L|e|t@1|e|r|s| |b|e|t|a| |w+0#af5f00255&|h|e|n| +0#0000000&|L|e|t@1|e|r|s|.|B|E|T|A| |=@1| |b|e|t|a| @19 +@24|-|>| |b|e|t|a|;| @42 +@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@8|-|>| |o|t|h|e|r|;| @37 +@8>}+0#00e0e07&|)+0#0000000&|;| @63 +@75 +@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|n+0#e000002&|u|l@1|)+0#0000000&| |{+0#00e0e07&| +0#0000000&@51 +@8|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r| |w+0#af5f00255&|h|e|n| +0#0000000&|!|"+0#e000002&|<|e|m|p|t|y|>|"|.+0#0000000&|e|q|u|a|l|s|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|s|t|r|)| |{+0#00e0e07&| +0#0000000&@13 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| |w+0#af5f00255&|h|e|n| +0#0000000&@41 +@20|P|r|e|d|i|c|a|t|e|.|<|S|t|r|i|n|g|>|n|o|t|(|t+0#00e0e07&|e|x|t| |-|>| +0#0000000&@25 +@28|!|t|e|x|t|.|i|s|E|m|p|t|y|(|)@1| @30 +@24|.|t|e|s|t|(|s|t|r|_|)| @39 +@28|-|>| |"+0#e000002&|<|e|m|p|t|y|>|"|;+0#0000000&| @33 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| @7|-|>| |s|t|r|_|;| @30 +@12|}+0#00e0e07&|)+0#0000000&|:| @8|{+0#00e0e07&| +0#0000000&|e|c|h|o|(|s|t|r|)|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@29 +@8|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @4|{+0#00e0e07&| +0#0000000&|e|c|h|o|(|"+0#e000002&|O|t|h|e|r|"|)+0#0000000&|;| |}+0#00e0e07&| +0#0000000&@24 +@8|}+0#00e0e07&|;+0#0000000&| @64 +@75 +@57|1|2|7|,|3|-|9| @6|8|9|%| |