processing / processing/processing4
Add support for Java 14 switch expressions
Đang mở
@AhmedMagedC đang làm issue này rồi.
Từ ngày 13/5/2025.
enhancement
help wanted
preprocessor
- Ngôn ngữ chính
- Java
- Star
- 494
- Fork
- 183
- Merge trung bình
- 4 giờ 39 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.