Rust printer: a class extending a JDK class with state (AbstractMap.SimpleEntry) loses that state

Đang mở
#200 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading the Rust printer and its existing INHERITANCE handling for external base classes; the issue names VarDefinitionHelper.VPPEntry and the affected merge_vars and merge_vars_2 functions. Check how AbstractMap.SimpleEntry and SimpleImmutableEntry state and accessors are represented, then verify that the printer either preserves the key and value behavior or reports the loss instead of silently emitting a struct without them.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug front-end:rust

A source class whose superclass is an external (JDK) class with state loses that state. On fernflower, VarDefinitionHelper.VPPEntry extends AbstractMap.SimpleEntry<VarVersion, VarVersion> and calls super(new VarVersion(key), value). It is printed as a struct with no key and no value, so merge_vars and merge_vars_2, which read getKey()/getValue(), cannot be written against it.

For the common JDK base classes with simple state (AbstractMap.SimpleEntry, SimpleImmutableEntry), the printer could:

  • give the struct the inherited fields, key and value;
  • map getKey/getValue/setValue onto them.

Otherwise it should report the loss, as INHERITANCE does for other external bases, so it is not silent.

🤖 Generated with Claude Code

Ngôn ngữ chính
Java
Star
1
Fork
1
Merge trung bình
48 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodeLaser/maddi

Tất cả issue của CodeLaser/maddi

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.