processing / processing/processing4
Add support for Java 14 switch expressions
未关闭
@AhmedMagedC 已经在做这个了。
开始于 2025年5月13日。
enhancement
help wanted
preprocessor
- 主要语言
- Java
- 星标
- 497
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
Created by: Santarii
Description
Switch expressions were added in Java 14, but produce a strange compile time error in Processing which is on Java 17.0.2.
Expected Behavior
Switch expressions should compile.
Current Behavior
They do not compile, and the first line in my exam,ple produces an error of "Syntax Error - Missing name or ; near ' int b = switch'?".
Steps to Reproduce
void setup() {
int a = 0;
int b = switch(a) {
case 0 -> 0;
default -> 1;
};
exit();
}
This switch expression runs fine in Eclipse and online IDEs that are in Java 17, but not in Processing. Other language features that are newer than switch expressions do work correctly.
Your Environment
- Processing version: 4.0b6.
- Operating System and OS version: Windows 10 Home 64-bit. 10.0.19043 Build 19043.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。