Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Verifier crashes on a call to a varargs method with two or more arguments

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 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
compilers

Hướng nghiên cứu

Start by running the minimal reproducer in main and trace how the verifier checks the count("a", "b") invocation against the varargs method. The issue does not name a source file or test, so locate the invocation-checking code and its existing tests. Done means the reproducer prints Correct! Passed Verification. instead of crashing.

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

Mô tả

bug

Impact: verification stops with an internal error. Found while building a test fixture; no example blocked yet.

Description

Calling a user-defined varargs method with two or more arguments crashes (Index 1 out of bounds for length 1): the arguments are matched one-to-one with the single array parameter.

Minimal reproducer

public class Repro {
    static int count(String... names) {
        return names.length;
    }

    public static void main(String[] args) {
        int n = count("a", "b");
        System.out.println(n);
    }
}

Expected

Correct! Passed Verification.

Actual

Exception in thread "main" java.lang.RuntimeException: 
Error while checking CtMethodImpl
  on main(String[] args) { 
  with 
Error while checking CtBlockImpl
  on { 
  with 
Error while checking CtLocalVariableImpl
  on n = count("a", "b"); 
  with 
Error while checking CtInvocationImpl
  on count("a", "b"); 
  with Index 1 out of bounds for length 1
Caused by: java.lang.RuntimeException: 

Reproduced on main at 0472025e (liquidjava-verifier 0.0.35); also on fbfb4e23 and 0.0.33 in the original form.

Context

Found while turning bugs mined from real open-source Java (fixed upstream or still present) into study examples for the error-message study.

Ngôn ngữ chính
Java
Star
67
Fork
36
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
28

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 liquid-java/liquidjava

Tất cả issue của liquid-java/liquidjava

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.