FS3886: This list expression contains a single tuple element. This warning is too trigger happy

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

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

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
57/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ệ
fsharp
Lĩnh vực
compilers

Hướng nghiên cứu

Start by locating the implementation and tests for warning FS3886 in the F# compiler; the issue does not name specific files. Check how the warning determines whether a single tuple element was likely intended as multiple list elements, then add coverage for elements with different types and for elements with the same type. Done when the warning is suppressed for the shown mixed-type tuple and retained when the elements have the same type.

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

Mô tả

Feature Request
let a =
  [
    1,"a"
  ]

Did you mean to use ';' instead of ',' to separate list elements?

The warning doesn't make sense when the list elements aren't of the same type.

I would like the warning to be given only if the elements are of the same type.

Ngôn ngữ chính
F#
Star
4.3k
Fork
883
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
80

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 dotnet/fsharp

Tất cả issue của dotnet/fsharp

Issue tương tự

Thêm issue về Compilers

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.