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

Type mismatch reported for interpolated strings with multiple % specifiers in IDE checking

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

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

@T-Gro đang làm issue này rồi.

Từ ngày 12/10/2026.

  • #20775 của @T-Gro — đang mở

Đá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
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả 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 reproducing the error with the snippet in the issue, using ParseAndCheckFileInProject in the language service rather than fsc. The report says this regressed in #19971, so check that change first to see how interpolated format strings are type-checked. Done means $"%b{flag} %b{flag}" type-checks without error in the IDE path and the existing interpolation tests still pass.

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

Mô tả

Bug

Consider this code:

let flag = true
let s = $"%b{flag} %b{flag}"

It compiles fine with fsc, but ParseAndCheckFileInProject reports an error on the string:

Error FS0001 : Type mismatch. Expecting a
    'bool -> string'    
but given a
    'bool -> bool -> string'    
The type 'string' does not match the type 'bool -> string'

It happens when there are two or more % specifiers and at least one of them is not a bare %s/%c/%d/%i/%M, i.e. %b, %A, %f or %5d.

This seems to be a regression in #19971. Initially reported as RIDER-143926.

Ngôn ngữ chính
F#
Star
4.3k
Fork
881
Merge trung bình
3 ngày 23 giờ
Pull request đã merge (30 ngày)
110

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.